aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-05-14 18:10:07 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-05-14 18:10:07 +0900
commit5f8bca32571fa9c651f6903d36f66082363f8879 (patch)
treef87a703513614f1c89757c72cd7cc840a8914cc7 /tool
parentf210d456a8a3ab29085bd811494c3bdf36dd6f69 (diff)
downloadruby-5f8bca32571fa9c651f6903d36f66082363f8879.tar.gz
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')
-rw-r--r--tool/lib/minitest/mock.rb2
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