diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-02 18:44:33 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-02 18:44:33 +0000 |
commit | 284d7463924b313f12da8de5184af3407c3612ac (patch) | |
tree | 84e55024358897290c86dbadece8253a128fc49e /test/ruby/test_yield.rb | |
parent | 233f7d09e3b5a46917023da7b152b5062036e25a (diff) | |
download | ruby-284d7463924b313f12da8de5184af3407c3612ac.tar.gz |
* vm_insnhelper.c (vm_yield_setup_block_args): partially revert r41019.
The code is not useless.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_yield.rb')
-rw-r--r-- | test/ruby/test_yield.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_yield.rb b/test/ruby/test_yield.rb index 3337aea078..143ee55a9f 100644 --- a/test/ruby/test_yield.rb +++ b/test/ruby/test_yield.rb @@ -379,4 +379,15 @@ class TestRubyYieldGen < Test::Unit::TestCase } end + def test_block_with_mock + y = Object.new + def y.s(a) + yield(a) + end + m = Object.new + def m.method_missing(*a) + super + end + assert_equal [m, nil], y.s(m){|a,b|[a,b]} + end end |