diff --git a/lib/bundler/rubygems_gem_installer.rb b/lib/bundler/rubygems_gem_installer.rb index 62756680e7..65fdf16072 100644 --- a/lib/bundler/rubygems_gem_installer.rb +++ b/lib/bundler/rubygems_gem_installer.rb @@ -145,7 +145,6 @@ module Bundler SharedHelpers.filesystem_access(extension_dir, :create) do FileUtils.mkdir_p extension_dir end - require "shellwords" unless Bundler.rubygems.provides?(">= 3.2.25") end def strict_rm_rf(dir) diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 7abaa236ed..e77704aa0a 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -20,10 +20,6 @@ module Bundler Gem::Requirement.new(req_str).satisfied_by?(version) end - def supports_bundler_trampolining? - provides?(">= 3.3.0.a") - end - def build_args require "rubygems/command" Gem::Command.build_args @@ -356,11 +352,7 @@ module Bundler @replaced_methods.each do |(sym, klass), method| redefine_method(klass, sym, method) end - if Binding.public_method_defined?(:source_location) - post_reset_hooks.reject! {|proc| proc.binding.source_location[0] == __FILE__ } - else - post_reset_hooks.reject! {|proc| proc.binding.eval("__FILE__") == __FILE__ } - end + post_reset_hooks.reject! {|proc| proc.binding.source_location[0] == __FILE__ } @replaced_methods.clear end diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb index a6d93f20ff..6ab41b99f7 100644 --- a/lib/bundler/self_manager.rb +++ b/lib/bundler/self_manager.rb @@ -106,7 +106,6 @@ module Bundler def autoswitching_applies? ENV["BUNDLER_VERSION"].nil? && - Bundler.rubygems.supports_bundler_trampolining? && ruby_can_restart_with_same_arguments? && SharedHelpers.in_bundle? && lockfile_version