mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c7e7846b8
commit
e6d7389c2b
1 changed files with 3 additions and 0 deletions
|
@ -756,6 +756,9 @@ class Gem::TestCase < MiniTest::Unit::TestCase
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue