diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-17 06:15:55 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-17 06:15:55 +0000 |
| commit | dea36fb2619235d145ebbfe582d2a26a1002566b (patch) | |
| tree | f3fafd00312d5562c2dab3951a947b958306381d /bootstraptest | |
| parent | 7c4a5414c8c44c4cbc3ea5bc7d2158cbd5652a27 (diff) | |
merges r20748 from trunk into ruby_1_9_1.
* vm_insnhelper.c (vm_callee_setup_arg_complex): uses cfp from
blockptr instead of the current cfp. [ruby-core:20544]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_block.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb index 2db149063..ce7f00b03 100644 --- a/bootstraptest/test_block.rb +++ b/bootstraptest/test_block.rb @@ -487,6 +487,24 @@ assert_equal 'ok', %q{ }, '[ruby-talk:266422]' assert_equal 'ok', %q{ + class C + define_method(:xyz) do |o, k, &block| + block.call(o, k) + end + end + C.new.xyz("o","k") {|o, k| o+k} +}, '[ruby-core:20544]' + +assert_equal 'ok', %q{ + class C + define_method(:xyz) do |*args, &block| + block.call(*args) + end + end + C.new.xyz("o","k") {|*args| args.join("")} +}, '[ruby-core:20544]' + +assert_equal 'ok', %q{ STDERR.reopen(STDOUT) class C define_method(:foo) do |&block| |
