diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-07-20 13:24:48 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-07-25 06:23:27 +0000 |
commit | 6bb34a7684955a45638f48101df01c1deaff8d62 (patch) | |
tree | 4a8ef9d0540b56966ee1d88a56763fc7196ff507 /lib | |
parent | 64530b545fec528de3423fbfe83dbe2138754715 (diff) | |
download | ruby-6bb34a7684955a45638f48101df01c1deaff8d62.tar.gz |
[rubygems/rubygems] Don't reuse require argument
https://github.com/rubygems/rubygems/commit/1712cd6149
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 447b7470a8..c74824ae1b 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -233,14 +233,14 @@ module Bundler [kernel, ::Kernel].each do |kernel_class| kernel_class.send(:alias_method, :no_warning_require, :require) kernel_class.send(:define_method, :require) do |file| - file.tr!("/", "-") - if (::Gem::BUNDLED_GEMS.keys - specs.to_a.map(&:name)).include?(file) + name = file.tr("/", "-") + if (::Gem::BUNDLED_GEMS.keys - specs.to_a.map(&:name)).include?(name) target_file = begin Bundler.default_gemfile.basename rescue GemfileNotFound "inline Gemfile" end - warn "#{file} is not part of the default gems since Ruby #{::Gem::BUNDLED_GEMS[file]}." \ + warn "#{name} is not part of the default gems since Ruby #{::Gem::BUNDLED_GEMS[file]}." \ " Add it to your #{target_file}." end kernel_class.send(:no_warning_require, file) |