diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_object.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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]' |
