[rubygems/rubygems] Remove more unnecessary ENV modifications

https://github.com/rubygems/rubygems/commit/457b25df1a
This commit is contained in:
David Rodríguez 2024-10-08 13:54:50 +02:00 committed by git
parent 6bd79e53cd
commit cfcc7522d4

View File

@ -290,8 +290,6 @@ module Spec
options = gems.last.is_a?(Hash) ? gems.pop : {} options = gems.last.is_a?(Hash) ? gems.pop : {}
install_dir = options.fetch(:path, system_gem_path) install_dir = options.fetch(:path, system_gem_path)
default = options.fetch(:default, false) default = options.fetch(:default, false)
with_gem_path_as(install_dir) do
gem_repo = options.fetch(:gem_repo, gem_repo1)
gems.each do |g| gems.each do |g|
gem_name = g.to_s gem_name = g.to_s
if gem_name.start_with?("bundler") if gem_name.start_with?("bundler")
@ -300,11 +298,11 @@ module Spec
elsif %r{\A(?:[a-zA-Z]:)?/.*\.gem\z}.match?(gem_name) elsif %r{\A(?:[a-zA-Z]:)?/.*\.gem\z}.match?(gem_name)
install_gem(gem_name, install_dir, default) install_gem(gem_name, install_dir, default)
else else
gem_repo = options.fetch(:gem_repo, gem_repo1)
install_gem("#{gem_repo}/gems/#{gem_name}.gem", install_dir, default) install_gem("#{gem_repo}/gems/#{gem_name}.gem", install_dir, default)
end end
end end
end end
end
def self.install_dev_bundler def self.install_dev_bundler
extend self extend self