[前][次][番号順一覧][スレッド一覧]

ruby-changes:45883

From: naruse <ko1@a...>
Date: Mon, 13 Mar 2017 18:05:39 +0900 (JST)
Subject: [ruby-changes:45883] naruse:r57956 (trunk): Raise error if spec is nil

naruse	2017-03-13 18:05:35 +0900 (Mon, 13 Mar 2017)

  New Revision: 57956

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57956

  Log:
    Raise error if spec is nil
    
    With parallel test-all, the spec is sometimes nil.
    To debug it raise more detailed error.

  Modified files:
    trunk/lib/rubygems/specification.rb
Index: lib/rubygems/specification.rb
===================================================================
--- lib/rubygems/specification.rb	(revision 57955)
+++ lib/rubygems/specification.rb	(revision 57956)
@@ -1128,6 +1128,9 @@ class Gem::Specification < Gem::BasicSpe https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification.rb#L1128
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]