diff options
author | Samuel Giddins <[email protected]> | 2023-02-26 22:32:56 -0800 |
---|---|---|
committer | git <[email protected]> | 2023-02-28 12:54:37 +0000 |
commit | 2d6097a0f588527a6b23679fc1503c361c068200 (patch) | |
tree | 0304a6cd117af9c8142b91b45d6b1a71ebe7c5d1 /lib/rubygems/commands/exec_command.rb | |
parent | cf18f0b868de01666cbef6a117ac1642f4e0aa08 (diff) |
[rubygems/rubygems] Fix method redefinition warning in gem exec specs
https://github.com/rubygems/rubygems/commit/f177990d4c
Diffstat (limited to 'lib/rubygems/commands/exec_command.rb')
-rw-r--r-- | lib/rubygems/commands/exec_command.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems/commands/exec_command.rb b/lib/rubygems/commands/exec_command.rb index a0837865f9..1d7e836ed0 100644 --- a/lib/rubygems/commands/exec_command.rb +++ b/lib/rubygems/commands/exec_command.rb @@ -235,11 +235,13 @@ to the same gem path as user-installed gems. name = :always_install cls = ::Gem::Resolver::InstallerSet method = cls.instance_method(name) + cls.remove_method(name) cls.define_method(name) { [] } begin yield ensure + cls.remove_method(name) cls.define_method(name, method) end end |