diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-13 09:05:35 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-13 09:05:35 +0000 |
commit | 0fc33f968d99d56afb132f6fd80983063da050cf (patch) | |
tree | 20d482a5680ff4885fc961ad3e784af2e2c79883 /lib | |
parent | 572420234414ad8dccb0b7af090c57f3ec3bb5c6 (diff) | |
download | ruby-0fc33f968d99d56afb132f6fd80983063da050cf.tar.gz |
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.rb | 3 |
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 |