summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-30 20:24:26 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-09-30 20:24:26 +0900
commit5ddc2ba13ed6964a0383894e3728dc1bc708c404 (patch)
tree552d393c06e1c20f3e88ace89fcfa034d74fac21
parentfc66947c61fe20f6f584ab3b1f7a5f10982af87e (diff)
test/ruby/test_io.rb: supress a "method redefined" warning
by explicitly removing the old definition.
-rw-r--r--test/ruby/test_io.rb3
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