summaryrefslogtreecommitdiff
path: root/bootstraptest/test_block.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-01 04:30:19 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-01 04:30:19 +0000
commit6fafbfd63e9f56350e06910bbac70bf7ff0d5df0 (patch)
tree339f523964f7af8c0c8cd90acb06d38486ec5dbf /bootstraptest/test_block.rb
parent4afa82056c42f9f2010fbc9d17c5aa3887610e2b (diff)
* insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on third
parameter of IFUNC. [ruby-dev:32329] * enumerator.c: fix to pass exact number of argument. * eval.c (rb_yield_values2): added. * include/ruby/ruby.h: ditto. * bootstraptest/test_knownbug.rb: move a fixed test. * bootstraptest/test_block.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_block.rb')
-rw-r--r--bootstraptest/test_block.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/bootstraptest/test_block.rb b/bootstraptest/test_block.rb
index d90f5ed..b4334ee 100644
--- a/bootstraptest/test_block.rb
+++ b/bootstraptest/test_block.rb
@@ -441,4 +441,17 @@ assert_equal 'ok', %q{
:ng
end
}, '[ruby-dev:31472]'
+assert_equal 'ok', %q{
+ class C
+ def each
+ yield [1,2]
+ yield 1,2
+ end
+ end
+ vs1 = []
+ C.new.each {|*v| vs1 << v }
+ vs2 = []
+ C.new.to_enum.each {|*v| vs2 << v }
+ vs1 == vs2 ? :ok : :ng
+}, '[ruby-dev:32329]'