summaryrefslogtreecommitdiff
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-19 14:00:00 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commita18e81d797135de6e143a600e4f4d2b00ab23bf9 (patch)
treeaaf319c30c0b65fa0f2718b445cc7efe33736210 /lib/rubygems/test_case.rb
parent8c8364c84e53303baf3828fd5266cb5aec54c582 (diff)
[rubygems/rubygems] Fix performance regression in `require`
Our check for `-I` paths should not go through all activated gems. https://github.com/rubygems/rubygems/commit/00d98eb8a3
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r--lib/rubygems/test_case.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index a63c99fd8e..9b83f03d31 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -388,6 +388,7 @@ class Gem::TestCase < Minitest::Test
Gem::Security.reset
Gem.loaded_specs.clear
+ Gem.instance_variable_set(:@activated_gem_paths, 0)
Gem.clear_default_specs
Bundler.reset!