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

Avoid a duplicated method definition of Object#stub

20210622T063005Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/rubygems/helper.rb:1565: warning: method redefined; discarding old stub
/home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/resolv/test_dns.rb:8: warning: previous definition of stub was here
```
This commit is contained in:
Yusuke Endoh 2021-06-22 16:36:36 +09:00
parent 6a48f62c51
commit ff609eee98

View file

@ -1591,7 +1591,7 @@ class Object
metaclass.send :undef_method, name metaclass.send :undef_method, name
metaclass.send :alias_method, name, new_name metaclass.send :alias_method, name, new_name
metaclass.send :undef_method, new_name metaclass.send :undef_method, new_name
end end unless method_defined?(:stub) # lib/resolv/test_dns.rb also has the same method definition
end end
require_relative 'utilities' require_relative 'utilities'