ruby-changes:50853
From: nobu <ko1@a...>
Date: Mon, 2 Apr 2018 13:20:11 +0900 (JST)
Subject: [ruby-changes:50853] nobu:r63060 (trunk): Keep feature names loaded in the block
nobu 2018-04-02 13:20:07 +0900 (Mon, 02 Apr 2018) New Revision: 63060 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63060 Log: Keep feature names loaded in the block * lib/rubygems/test_case.rb (Gem::TestCase#save_loaded_features): keep feature names for rubygem libraries loaded in the block. c.f. rubygems/rubygems#2261 Modified files: trunk/lib/rubygems/test_case.rb Index: lib/rubygems/test_case.rb =================================================================== --- lib/rubygems/test_case.rb (revision 63059) +++ lib/rubygems/test_case.rb (revision 63060) @@ -756,6 +756,9 @@ class Gem::TestCase < MiniTest::Unit::Te https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L756 old_loaded_features = $LOADED_FEATURES.dup yield ensure + prefix = File.dirname(__FILE__) + "/" + new_features = ($LOADED_FEATURES - old_loaded_features) + old_loaded_features.concat(new_features.select {|f| f.rindex(prefix, 0)}) $LOADED_FEATURES.replace old_loaded_features end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/