зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Restore support for Pathname objects in the replaced require
https://github.com/rubygems/rubygems/commit/f7b4282ef7
This commit is contained in:
Родитель
9721972175
Коммит
437a4ccbf2
|
@ -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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче