summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-13 09:05:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-13 09:05:35 +0000
commit193321503804586ebf7da3ea1e00bcc109bc1968 (patch)
tree20d482a5680ff4885fc961ad3e784af2e2c79883 /lib
parent81798351011f8a7c1bf82e4ac195c4f2c0c23ecf (diff)
Raise error if spec is nil
With parallel test-all, the spec is sometimes nil. To debug it raise more detailed error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rubygems/specification.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb
index 5bbaec3911..a2f289d162 100644
--- a/lib/rubygems/specification.rb
+++ b/lib/rubygems/specification.rb
@@ -1128,6 +1128,9 @@ class Gem::Specification < Gem::BasicSpecification
native = {}
specs.reverse_each do |spec|
+ unless spec
+ raise Gem::Exception, "unexpectedly spec is nil: #{specs}"
+ end
next if spec.version.prerelease? unless prerelease
native[spec.name] = spec.version if spec.platform == Gem::Platform::RUBY