aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/installer/standalone.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-07-31 20:08:30 +0900
committergit <svn-admin@ruby-lang.org>2023-08-01 00:31:22 +0000
commitde91ce980ad6022a506ec12c7eb20392a37e98fe (patch)
treec156b766d73c00b64a93561bb3daa0772bbe531d /lib/bundler/installer/standalone.rb
parent3f010d48fc0be34799eeeb5661e7ffb3b5319d5c (diff)
downloadruby-de91ce980ad6022a506ec12c7eb20392a37e98fe.tar.gz
[rubygems/rubygems] Use Kernel.singleton_class
https://github.com/rubygems/rubygems/commit/9be984f281
Diffstat (limited to 'lib/bundler/installer/standalone.rb')
-rw-r--r--lib/bundler/installer/standalone.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb
index 2a8c9a432d..a019fbd3b8 100644
--- a/lib/bundler/installer/standalone.rb
+++ b/lib/bundler/installer/standalone.rb
@@ -87,8 +87,7 @@ module Bundler
if Gem.respond_to?(:discover_gems_on_require=)
Gem.discover_gems_on_require = false
else
- kernel = (class << ::Kernel; self; end)
- [kernel, ::Kernel].each do |k|
+ [::Kernel.singleton_class, ::Kernel].each do |k|
if k.private_method_defined?(:gem_original_require)
private_require = k.private_method_defined?(:require)
k.send(:remove_method, :require)