diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2023-10-26 22:12:02 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-11-13 11:06:10 +0900 |
commit | 50482cd1e5542f210565440bed7586821f774a29 (patch) | |
tree | 78ea56dcf75b96116fc6bb5fd3dd4b6cfdd72316 /lib/bundler/shared_helpers.rb | |
parent | 54511303a46901a82e9b2d4ee460b2048e59a2e5 (diff) |
[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in Bundler
https://github.com/rubygems/rubygems/commit/93619c97ff
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 5196243949..cccc2b63d9 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -13,13 +13,13 @@ module Bundler def root gemfile = find_gemfile raise GemfileNotFound, "Could not locate Gemfile" unless gemfile - Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent + Pathname.new(gemfile).expand_path.parent end def default_gemfile gemfile = find_gemfile raise GemfileNotFound, "Could not locate Gemfile" unless gemfile - Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path + Pathname.new(gemfile).expand_path end def default_lockfile @@ -28,7 +28,7 @@ module Bundler case gemfile.basename.to_s when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked")) else Pathname.new("#{gemfile}.lock") - end.tap {|x| x.untaint if RUBY_VERSION < "2.7" } + end end def default_bundle_dir @@ -100,7 +100,7 @@ module Bundler # # @see {Bundler::PermissionError} def filesystem_access(path, action = :write, &block) - yield(path.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" }) + yield(path.dup) rescue Errno::EACCES raise PermissionError.new(path, action) rescue Errno::EAGAIN @@ -250,7 +250,7 @@ module Bundler def search_up(*names) previous = nil - current = File.expand_path(SharedHelpers.pwd).tap {|x| x.untaint if RUBY_VERSION < "2.7" } + current = File.expand_path(SharedHelpers.pwd) until !File.directory?(current) || current == previous if ENV["BUNDLER_SPEC_RUN"] @@ -299,7 +299,7 @@ module Bundler Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", find_gemfile.to_s Bundler::SharedHelpers.set_env "BUNDLER_VERSION", Bundler::VERSION - Bundler::SharedHelpers.set_env "BUNDLER_SETUP", File.expand_path("setup", __dir__) unless RUBY_VERSION < "2.7" + Bundler::SharedHelpers.set_env "BUNDLER_SETUP", File.expand_path("setup", __dir__) end def set_path |