diff options
author | Ellen Marie Dash <me@duckie.co> | 2023-09-29 23:50:30 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-11 19:07:28 +0000 |
commit | c83f8ad8671afbd8e9ae70c2c4e69a80c6a96d67 (patch) | |
tree | 003505d5ad2dd0ca5728b53654f90f7a8414a5d7 /test/rubygems | |
parent | e84b73398b96ea7abbeb3a17caae71b365f5016d (diff) | |
download | ruby-c83f8ad8671afbd8e9ae70c2c4e69a80c6a96d67.tar.gz |
[rubygems/rubygems] Simplify logic for Gem::PathSupport#home, and make GEM_HOME always overide it.
https://github.com/rubygems/rubygems/commit/64273fd7e3
Diffstat (limited to 'test/rubygems')
-rw-r--r-- | test/rubygems/test_gem_install_update_options.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb index 8c58520577..6ed40d226a 100644 --- a/test/rubygems/test_gem_install_update_options.rb +++ b/test/rubygems/test_gem_install_update_options.rb @@ -165,6 +165,9 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase return end + orig_gem_home = ENV["GEM_HOME"] + ENV.delete("GEM_HOME") + @spec = quick_gem "a" do |spec| util_make_exec spec end @@ -179,11 +182,12 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase FileUtils.chmod 0o755, @userhome FileUtils.chmod 0o000, @gemhome - Gem.use_paths @gemhome, @userhome + Gem.use_paths nil, @userhome assert_equal Gem.paths.home, Gem.user_dir ensure FileUtils.chmod 0o755, @gemhome + ENV["GEM_HOME"] = orig_gem_home if orig_gem_home end def test_vendor |