diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-30 21:16:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-30 21:16:31 +0000 |
commit | 9b02e165d3a0618fb5f0cefd55a30fb327ad3a5f (patch) | |
tree | 5d41d96954788328f74a12b1aa816bdb8f7a2f23 /bootstraptest | |
parent | be189996997e57bc87b831aed42b9a531823b5f7 (diff) | |
download | ruby-9b02e165d3a0618fb5f0cefd55a30fb327ad3a5f.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@25967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_syntax.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 6843b23285..2e8639b3f4 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 |