зеркало из https://github.com/github/ruby.git
test/ruby/test_io.rb: supress a "method redefined" warning
by explicitly removing the old definition.
This commit is contained in:
Родитель
fc66947c61
Коммит
5ddc2ba13e
|
@ -2296,6 +2296,9 @@ class TestIO < Test::Unit::TestCase
|
|||
assert_equal({:a=>1}, open(o, {a: 1}))
|
||||
end
|
||||
|
||||
class << o
|
||||
remove_method(:to_open)
|
||||
end
|
||||
def o.to_open(kw); kw; end
|
||||
assert_equal({:a=>1}, open(o, a: 1))
|
||||
unless redefined
|
||||
|
|
Загрузка…
Ссылка в новой задаче