From 41f4317f45021460871bd11c666f438f5517904b Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Feb 2016 07:48:02 +0000 Subject: test/ruby: suppress parser warnings git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_method.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'test/ruby/test_method.rb') diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 1e5f05473c..7816e6c3a0 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -322,7 +322,7 @@ class TestMethod < Test::Unit::TestCase def o.define(n) define_singleton_method(n) end - assert_raise(ArgumentError) {o.define(:bar) {:bar}} + assert_raise(ArgumentError, bug11283) {o.define(:bar) {:bar}} end def test_define_method_invalid_arg @@ -804,7 +804,7 @@ class TestMethod < Test::Unit::TestCase def test_curry_from_proc c = Class.new { - define_method(:three_args) {|a,b,c| a + b + c} + define_method(:three_args) {|x,y,z| x + y + z} } assert_curry_three_args(c.new.method(:three_args)) end @@ -901,7 +901,7 @@ class TestMethod < Test::Unit::TestCase class C D = "Const_D" def foo - a = b = c = 12345 + a = b = c = a = b = c = 12345 end end @@ -909,16 +909,16 @@ class TestMethod < Test::Unit::TestCase bug11012 = '[ruby-core:68673] [Bug #11012]' b = C.new.method(:foo).to_proc.binding - assert_equal([], b.local_variables) - assert_equal("Const_D", b.eval("D")) # Check CREF - - assert_raise(NameError){ b.local_variable_get(:foo) } - assert_equal(123, b.local_variable_set(:foo, 123)) - assert_equal(123, b.local_variable_get(:foo)) - assert_equal(456, b.local_variable_set(:bar, 456)) - assert_equal(123, b.local_variable_get(:foo)) - assert_equal(456, b.local_variable_get(:bar)) - assert_equal([:bar, :foo], b.local_variables.sort) + assert_equal([], b.local_variables, bug11012) + assert_equal("Const_D", b.eval("D"), bug11012) # Check CREF + + assert_raise(NameError, bug11012){ b.local_variable_get(:foo) } + assert_equal(123, b.local_variable_set(:foo, 123), bug11012) + assert_equal(123, b.local_variable_get(:foo), bug11012) + assert_equal(456, b.local_variable_set(:bar, 456), bug11012) + assert_equal(123, b.local_variable_get(:foo), bug11012) + assert_equal(456, b.local_variable_get(:bar), bug11012) + assert_equal([:bar, :foo], b.local_variables.sort, bug11012) end class MethodInMethodClass -- cgit v1.2.3