diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-09-30 20:24:26 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-09-30 20:24:26 +0900 |
commit | 5ddc2ba13ed6964a0383894e3728dc1bc708c404 (patch) | |
tree | 552d393c06e1c20f3e88ace89fcfa034d74fac21 /test/ruby | |
parent | fc66947c61fe20f6f584ab3b1f7a5f10982af87e (diff) | |
download | ruby-5ddc2ba13ed6964a0383894e3728dc1bc708c404.tar.gz |
test/ruby/test_io.rb: supress a "method redefined" warning
by explicitly removing the old definition.
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 6a27b5dc93..cabcc652c1 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -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 |