summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2023-07-27 23:01:00 +0200
committergit <svn-admin@ruby-lang.org>2023-07-27 23:07:19 +0000
commit437a4ccbf2e944a7029fc55df789e0fbb945f162 (patch)
treec9cd27a7c99ce784858c7c18a07ab220a3811b0c
parent97219721752e7cc1eda51131d6a3cd753d37276c (diff)
[rubygems/rubygems] Restore support for Pathname objects in the replaced require
https://github.com/rubygems/rubygems/commit/f7b4282ef7
-rw-r--r--lib/bundler/rubygems_integration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 4a69329852..e2d805d0ed 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -249,7 +249,7 @@ module Bundler
[::Kernel.singleton_class, ::Kernel].each do |kernel_class|
kernel_class.send(:alias_method, :no_warning_require, :require)
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)
unless $LOADED_FEATURES.any? {|f| f.end_with?("#{name}.rb", "#{name}.#{RbConfig::CONFIG["DLEXT"]}") }
target_file = begin