summaryrefslogtreecommitdiff
path: root/lib/bundler/rubygems_ext.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2023-10-26 22:12:02 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-11-13 11:06:10 +0900
commit50482cd1e5542f210565440bed7586821f774a29 (patch)
tree78ea56dcf75b96116fc6bb5fd3dd4b6cfdd72316 /lib/bundler/rubygems_ext.rb
parent54511303a46901a82e9b2d4ee460b2048e59a2e5 (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/rubygems_ext.rb')
-rw-r--r--lib/bundler/rubygems_ext.rb19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index 0296fc543d..77e87288c3 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -46,7 +46,7 @@ module Gem
def full_gem_path
if source.respond_to?(:root)
- Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
+ Pathname.new(loaded_from).dirname.expand_path(source.root).to_s
else
rg_full_gem_path
end
@@ -94,7 +94,7 @@ module Gem
rg_missing_extensions?
end
- remove_method :gem_dir if instance_methods(false).include?(:gem_dir)
+ remove_method :gem_dir
def gem_dir
full_gem_path
end
@@ -135,17 +135,6 @@ module Gem
gemfile
end
- # Backfill missing YAML require when not defined. Fixed since 3.1.0.pre1.
- module YamlBackfiller
- def to_yaml(opts = {})
- Gem.load_yaml unless defined?(::YAML)
-
- super(opts)
- end
- end
-
- prepend YamlBackfiller
-
def nondevelopment_dependencies
dependencies - development_dependencies
end
@@ -382,9 +371,7 @@ module Gem
require "rubygems/util"
Util.singleton_class.module_eval do
- if Util.singleton_methods.include?(:glob_files_in_dir) # since 3.0.0.beta.2
- remove_method :glob_files_in_dir
- end
+ remove_method :glob_files_in_dir
def glob_files_in_dir(glob, base_path)
Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) }