summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-01-28 14:21:44 +0900
committerKoichi Sasada <ko1@atdot.net>2020-01-28 15:23:51 +0900
commit56b0300f24bc2bce6309279e2c07e8a1f08044e4 (patch)
treed82d1e1b39b633beb9c21c714df65d4eb98e4de2
parent1bc731cb65cfd9baae718b9a8588e668dd1c75e0 (diff)
support multi-run for test/ruby/test_proc.rb
Mysterious error: `remove_method(:foo) if method_defined?(:foo)` raise an exception `method `foo' not defined in #<Class:#<TestProc:0x000055d12ff154e0>>` This patch rename the method name foo to foo_arity to solve it.
-rw-r--r--test/ruby/test_proc.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 4177707ddd..b00f42d81a 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -59,10 +59,10 @@ class TestProc < Test::Unit::TestCase
Proc.new
end
meta.class_eval {
- remove_method(:foo) if method_defined?(:foo)
- define_method(:foo, b)
+ remove_method(:foo_arity) if method_defined?(:foo_arity)
+ define_method(:foo_arity, b)
}
- assert_equal(n, method(:foo).arity)
+ assert_equal(n, method(:foo_arity).arity)
end
def test_arity