diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2021-05-14 18:10:07 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2021-05-14 18:10:07 +0900 |
commit | 5f8bca32571fa9c651f6903d36f66082363f8879 (patch) | |
tree | f87a703513614f1c89757c72cd7cc840a8914cc7 /tool/lib | |
parent | f210d456a8a3ab29085bd811494c3bdf36dd6f69 (diff) |
tool/lib/minitest/mock.rb: define Object#stub only when not defined
Recently, lib/rubygems/test_case.rb also defines the method.
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/minitest/mock.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/minitest/mock.rb b/tool/lib/minitest/mock.rb index 224b06cb89..a723084a0f 100644 --- a/tool/lib/minitest/mock.rb +++ b/tool/lib/minitest/mock.rb @@ -192,5 +192,5 @@ class Object # :nodoc: metaclass.send :undef_method, name metaclass.send :alias_method, name, new_name metaclass.send :undef_method, new_name - end + end unless method_defined?(:stub) # lib/rubygems/test_case.rb also has the same method definition end |