Skip to content

Commit 437a4cc

Browse files
fxnmatzbot
authored andcommitted
[rubygems/rubygems] Restore support for Pathname objects in the replaced require
rubygems/rubygems@f7b4282ef7
1 parent 9721972 commit 437a4cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bundler/rubygems_integration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def replace_require(specs)
249249
[::Kernel.singleton_class, ::Kernel].each do |kernel_class|
250250
kernel_class.send(:alias_method, :no_warning_require, :require)
251251
kernel_class.send(:define_method, :require) do |file|
252-
name = file.tr("/", "-")
252+
name = file.to_s.tr("/", "-")
253253
if (::Gem::BUNDLED_GEMS.keys - specs.to_a.map(&:name)).include?(name)
254254
unless $LOADED_FEATURES.any? {|f| f.end_with?("#{name}.rb", "#{name}.#{RbConfig::CONFIG["DLEXT"]}") }
255255
target_file = begin

0 commit comments

Comments
 (0)