summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2021-10-22 15:43:27 -0400
committergit <svn-admin@ruby-lang.org>2021-10-25 19:02:50 +0900
commit7394514bde24af482d4db5a89eb3fcd28f87ac11 (patch)
treed5113e0fbc7a601b1367dd25cf4ff15ae7163529
parenta1c4cab11d613d7df037a81a770ee44a23a2e9be (diff)
[rubygems/rubygems] Simplify and remove some unused code
When `install_with_build_args` was added in https://github.com/rubygems/rubygems/commit/be96283985cb49c023112117b2ac2dea0d9becf1, there were two versions of the method: the default version in the base class that still used the locking `with_build_args`, and an override in the `Future` class (for Rubygems 2.0 and up) that yielded without calling `with_build_args`. The `with_build_args` version of the method was removed in https://github.com/rubygems/rubygems/commit/8a5b71e3e8072c64a0f3cab838ba330f5e87e37a while removing a bunch of the old Rubygems compatibility code. This commit removes `with_build_args`, since it no longer appears to be used (the build args are passed as a keyword argument to `spec.source.install` instead, since https://github.com/rubygems/rubygems/commit/be96283985cb49c023112117b2ac2dea0d9becf1). The commit also removes `install_with_build_args` and the conditional around it, since the method wasn't doing anything different than `install`, and it had a comment that was no longer accurate. https://github.com/rubygems/rubygems/commit/ba543a60eb
-rw-r--r--lib/bundler/installer/gem_installer.rb7
-rw-r--r--lib/bundler/rubygems_integration.rb16
2 files changed, 1 insertions, 22 deletions
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index 1df86ccfbc..13a1356f56 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -13,7 +13,7 @@ module Bundler
end
def install_from_spec
- post_install_message = spec_settings ? install_with_settings : install
+ post_install_message = install
Bundler.ui.debug "#{worker}: #{spec.name} (#{spec.version}) from #{spec.loaded_from}"
generate_executable_stubs
return true, post_install_message
@@ -54,11 +54,6 @@ module Bundler
spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings))
end
- def install_with_settings
- # Build arguments are global, so this is mutexed
- Bundler.rubygems.install_with_build_args([spec_settings]) { install }
- end
-
def out_of_space_message
"#{install_error_message}\nYour disk is out of space. Free some space to be able to install your bundle."
end
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 8589c14704..ba4317775e 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -232,18 +232,6 @@ module Bundler
EXT_LOCK
end
- def with_build_args(args)
- ext_lock.synchronize do
- old_args = build_args
- begin
- self.build_args = args
- yield
- ensure
- self.build_args = old_args
- end
- end
- end
-
def spec_from_gem(path, policy = nil)
require "rubygems/security"
require_relative "psyched_yaml"
@@ -550,10 +538,6 @@ module Bundler
Gem::REPOSITORY_SUBDIRECTORIES
end
- def install_with_build_args(args)
- yield
- end
-
def path_separator
Gem.path_separator
end