diff options
author | David RodrÃguez <[email protected]> | 2025-06-16 18:46:11 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-19 10:23:36 +0900 |
commit | 4281b95e537aeaecbcbce08311b96025563a1c88 (patch) | |
tree | 0f5960de440ef83d21c280223ba05957ed5d811a /lib | |
parent | 382b8eadaec8b3067f03a4f614407287ce560461 (diff) |
[rubygems/rubygems] Move finding eigenclass to a method
https://github.com/rubygems/rubygems/commit/5ad0737e77
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index eddf36278c..1dd7ae4039 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -222,8 +222,6 @@ module Bundler # Used to give better error messages when activating specs outside of the current bundle def replace_bin_path(specs_by_name) - gem_class = (class << Gem; self; end) - redefine_method(gem_class, :find_spec_for_exe) do |gem_name, *args| exec_name = args.first raise ArgumentError, "you must supply exec_name" unless exec_name @@ -345,7 +343,7 @@ module Bundler Gem::Specification.all = specs end - redefine_method((class << Gem; self; end), :finish_resolve) do |*| + redefine_method(gem_class, :finish_resolve) do |*| [] end end @@ -447,6 +445,12 @@ module Bundler def default_stubs Gem::Specification.default_stubs("*.gemspec") end + + private + + def gem_class + class << Gem; self; end + end end def self.rubygems |