test/ruby/test_proc.rb: suppress "method redefined" warnings
This commit is contained in:
parent
179062dd80
commit
48edaf8b8a
@ -58,7 +58,10 @@ class TestProc < Test::Unit::TestCase
|
|||||||
b = assert_warn(/Capturing the given block using Proc\.new is deprecated/) do
|
b = assert_warn(/Capturing the given block using Proc\.new is deprecated/) do
|
||||||
Proc.new
|
Proc.new
|
||||||
end
|
end
|
||||||
meta.class_eval {define_method(:foo, b)}
|
meta.class_eval {
|
||||||
|
remove_method(:foo) if method_defined?(:foo)
|
||||||
|
define_method(:foo, b)
|
||||||
|
}
|
||||||
assert_equal(n, method(:foo).arity)
|
assert_equal(n, method(:foo).arity)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user