summaryrefslogtreecommitdiff
path: root/lib/rubygems
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-17 04:44:13 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-17 04:44:13 +0000
commit97c77bacfb24994cc0f5c33731a88f59ad0b6e79 (patch)
tree507f653027b0813b9b80a4227307fab4302a0b23 /lib/rubygems
parent1492c6f695642dce63d368fdee89ff2fcbcffdeb (diff)
merge revision(s) 57956:
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/branches/ruby_2_4@58002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-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