summaryrefslogtreecommitdiff
path: root/bootstraptest/test_block.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-15 07:26:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-15 07:26:48 +0000
commit8c8d666467eb3f94920592f63f56d1d4354350a0 (patch)
tree258efbf9f7faed290d931bc63cc46a6ed2251b68 /bootstraptest/test_block.rb
parent3a5c0bbcb5615b063d32aeee35b4f0f4227fb693 (diff)
* vm_insnhelper.c (vm_callee_setup_arg_complex): uses cfp from
blockptr instead of the current cfp. [ruby-core:20544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_block.rb')
-rw-r--r--bootstraptest/test_block.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb
index 2db1490..ce7f00b 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|