summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-26 08:44:43 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-26 08:44:43 +0000
commit521590b86ea31e0ebf25cdabf641c9321b7e0f00 (patch)
treef2b31fb51cd0a095868a0bd647100f39a123064a /bootstraptest
parentf5b53613764e2d7ef226939c78bc7d71cc40706d (diff)
downloadruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.tar.gz
ruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.tar.xz
ruby-521590b86ea31e0ebf25cdabf641c9321b7e0f00.zip
* compile.c (iseq_compile_each): validate argument expr of "next"
statement. * bootstraptest/test_syntax.rb: add a test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_syntax.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 1c5121cda..8a6e622f6 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -758,3 +758,11 @@ assert_equal 'ok', %q{
end
:ok
}, '[ruby-dev:32882]'
+
+assert_equal "1\n2\n", %q{
+ i = 0
+ while i<2
+ i += 1
+ next p(i)
+ end
+}