[rubygems/rubygems] Restore support for Pathname objects in the replaced require

https://github.com/rubygems/rubygems/commit/f7b4282ef7
This commit is contained in:
Xavier Noria 2023-07-27 23:01:00 +02:00 коммит произвёл git
Родитель 9721972175
Коммит 437a4ccbf2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -249,7 +249,7 @@ module Bundler
[::Kernel.singleton_class, ::Kernel].each do |kernel_class| [::Kernel.singleton_class, ::Kernel].each do |kernel_class|
kernel_class.send(:alias_method, :no_warning_require, :require) kernel_class.send(:alias_method, :no_warning_require, :require)
kernel_class.send(:define_method, :require) do |file| kernel_class.send(:define_method, :require) do |file|
name = file.tr("/", "-") name = file.to_s.tr("/", "-")
if (::Gem::BUNDLED_GEMS.keys - specs.to_a.map(&:name)).include?(name) if (::Gem::BUNDLED_GEMS.keys - specs.to_a.map(&:name)).include?(name)
unless $LOADED_FEATURES.any? {|f| f.end_with?("#{name}.rb", "#{name}.#{RbConfig::CONFIG["DLEXT"]}") } unless $LOADED_FEATURES.any? {|f| f.end_with?("#{name}.rb", "#{name}.#{RbConfig::CONFIG["DLEXT"]}") }
target_file = begin target_file = begin