From 66f9d5fe11ca774b850cd55ca3476eb23d6db08a Mon Sep 17 00:00:00 2001 From: ktsj Date: Mon, 2 Jan 2012 06:25:01 +0000 Subject: * test/ruby/test_object.rb (test_send_with_block): moved from bootstraptest/test_flow.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_object.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/ruby/test_object.rb') diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 4ce422f7b5..5c6824e8a5 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -437,6 +437,20 @@ class TestObject < Test::Unit::TestCase assert_raise(ArgumentError) { 1.send } end + def test_send_with_block + x = :ok + o = Object.new + def o.inspect + yield if block_given? + super + end + begin + nil.public_send(o) { x = :ng } + rescue + end + assert_equal(:ok, x) + end + def test_no_superclass_method bug2312 = '[ruby-dev:39581]' -- cgit v1.2.3