summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Panozzo <panozzaj@gmail.com>2026-01-17 15:19:58 -0500
committergit <svn-admin@ruby-lang.org>2026-02-12 17:06:39 +0000
commitf33073a6cb8e6800309de815a1acce3322401bd1 (patch)
treeb483fdd96ecfe933ef149dbf62c6d9d51278e780
parent104c8be99cac15810456577ca14f9c2887c1c5d7 (diff)
[ruby/rubygems] Fix Gem.clear_paths to reset cache_home and data_home
These memoized instance variables were not being cleared, causing test isolation issues when HOME environment variable changes. https://github.com/ruby/rubygems/commit/a8b3e0bca0
-rw-r--r--lib/rubygems.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 2139264629..490c81821d 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -351,6 +351,8 @@ module Gem
def self.clear_paths
@paths = nil
@user_home = nil
+ @cache_home = nil
+ @data_home = nil
Gem::Specification.reset
Gem::Security.reset if defined?(Gem::Security)
end