1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

tool/lib/minitest/mock.rb: define Object#stub only when not defined

Recently, lib/rubygems/test_case.rb also defines the method.
This commit is contained in:
Yusuke Endoh 2021-05-14 18:10:07 +09:00
parent f210d456a8
commit 5f8bca3257

View file

@ -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