From 97c77bacfb24994cc0f5c33731a88f59ad0b6e79 Mon Sep 17 00:00:00 2001 From: naruse Date: Fri, 17 Mar 2017 04:44:13 +0000 Subject: [PATCH] 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 --- lib/rubygems/specification.rb | 3 +++ version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 diff --git a/version.h b/version.h index 94eedbbe2e..2299a31817 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.4.0" #define RUBY_RELEASE_DATE "2017-03-17" -#define RUBY_PATCHLEVEL 103 +#define RUBY_PATCHLEVEL 104 #define RUBY_RELEASE_YEAR 2017 #define RUBY_RELEASE_MONTH 3