From bd5368fdec1109b3bf3dfa635f6ab1d60cfc5ddc Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Mon, 23 Oct 2023 16:19:59 +0200 Subject: [rubygems/rubygems] Don't use `util_installer` for user install It is not nice to require install directory to be always specified, while this option is later ignored for user installed gems. Actually, the next step will be to remove `check_install_dir` check and let the install dir override the user install. https://github.com/rubygems/rubygems/commit/beb79e929f --- test/rubygems/installer_test_case.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/rubygems/installer_test_case.rb b/test/rubygems/installer_test_case.rb index 705de6804e..dc978d06b0 100644 --- a/test/rubygems/installer_test_case.rb +++ b/test/rubygems/installer_test_case.rb @@ -111,7 +111,7 @@ class Gem::InstallerTestCase < Gem::TestCase def setup_base_installer(force = true) @gem = setup_base_gem - util_installer @spec, @gemhome, false, force + util_installer @spec, @gemhome, force end ## @@ -163,7 +163,7 @@ class Gem::InstallerTestCase < Gem::TestCase @user_gem = @user_spec.cache_file - util_installer @user_spec, Gem.user_dir, :user + Gem::Installer.at @user_gem, :user_install => true end ## @@ -219,13 +219,11 @@ class Gem::InstallerTestCase < Gem::TestCase end ## - # Creates an installer for +spec+ that will install into +gem_home+. If - # +user+ is true a user-install will be performed. + # Creates an installer for +spec+ that will install into +gem_home+. - def util_installer(spec, gem_home, user=false, force=true) + def util_installer(spec, gem_home, force=true) Gem::Installer.at(spec.cache_file, :install_dir => gem_home, - :user_install => user, :force => force) end -- cgit v1.2.3