diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-02 06:25:01 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-02 06:25:01 +0000 |
commit | 66f9d5fe11ca774b850cd55ca3476eb23d6db08a (patch) | |
tree | e791afc1a91c613fd5f40171485093b757c6f838 /test/ruby | |
parent | 7d9fe82be47d67e44069e80904ef06d34d2cce29 (diff) | |
download | ruby-66f9d5fe11ca774b850cd55ca3476eb23d6db08a.tar.gz |
* 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
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]' |