summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-30 21:16:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-30 21:16:31 +0000
commit92ac7e6d4f34a7209244d8671e4f3ca669139f1a (patch)
tree5d41d96954788328f74a12b1aa816bdb8f7a2f23 /bootstraptest
parent54af77e9246df3f7ce972ac184cbbf3f3de404b8 (diff)
downloadruby-92ac7e6d4f34a7209244d8671e4f3ca669139f1a.tar.gz
ruby-92ac7e6d4f34a7209244d8671e4f3ca669139f1a.tar.xz
ruby-92ac7e6d4f34a7209244d8671e4f3ca669139f1a.zip
* parse.y (dyna_push_gen, dyna_pop_gen): adjust local vtable level
for the case of syntax errors in method name or argument inside do block. [ruby-core:26961] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_syntax.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 6843b2328..2e8639b3f 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -836,3 +836,44 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
"o" "#{}k"
}, '[ruby-dev:38980]'
+
+bug2415 = '[ruby-core:26961]'
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a=1, b, *rest); nil end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x@; nil end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a = 0.times do
+ def y(a=1, b, *rest); nil; end
+ end)
+ nil
+ end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a = 0.times do
+ def x@; nil; end
+ end)
+ nil
+ end
+ end
+ end
+}, bug2415