diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_eval.rb | 4 | ||||
-rw-r--r-- | bootstraptest/test_method.rb | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb index 5de4f4ef8c..ed3deba989 100644 --- a/bootstraptest/test_eval.rb +++ b/bootstraptest/test_eval.rb @@ -89,12 +89,12 @@ assert_equal %q{1}, %q{ eval('a') } assert_equal %q{ok}, %q{ - __send! :eval, %{ + __send__ :eval, %{ :ok } } assert_equal %q{ok}, %q{ - 1.__send! :instance_eval, %{ + 1.__send__ :instance_eval, %{ :ok } } diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 54ba5f8442..76901f6f6e 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -314,9 +314,9 @@ assert_equal '1', %q( class C; def m(x,a=7) a end end; assert_equal '[1, 2]', %q( class C; def m(*a) a end end; C.new.send(:m,1,2).inspect ) assert_equal '1', %q( class C; def m() 7 end; private :m end - begin C.new.send(:m); rescue NoMethodError; 1 end ) + begin C.new.invoke_method(:m); rescue NoMethodError; 1 end ) assert_equal '1', %q( class C; def m() 1 end; private :m end - C.new.send!(:m) ) + C.new.send(:m) ) # with block assert_equal '[[:ok1, :foo], [:ok2, :foo, :bar]]', @@ -867,8 +867,6 @@ assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{ end end - alias send! send unless defined? send! - c1 = c2 = nil lambda{ @@ -899,8 +897,8 @@ assert_equal %q{[:ok, :ok, :ok, :ok, :ok, :ok, :ng, :ng]}, %q{ test{o2.mm} test{o1.send :m} test{o2.send :mm} - test{o1.send! :m} - test{o2.send! :mm} + test{o1.invoke_method :m} + test{o2.invoke_method :mm} test{o1.method(:m).call} test{o2.method(:mm).call} $ans |