mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_io.rb: supress a "method redefined" warning
by explicitly removing the old definition.
This commit is contained in:
parent
fc66947c61
commit
5ddc2ba13e
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue