diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-05 09:40:17 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-05 09:40:17 +0000 |
commit | 223a28467635983ed1caa26a71157521daa81a43 (patch) | |
tree | b89cba3211fd0fbe01737e05612a19a348ed7c3b /bootstraptest/test_syntax.rb | |
parent | c5a533a5cf49904ec1544bd22dba079abcd0e7be (diff) |
merges r25967, r25968 and r25969 from trunk into ruby_1_9_1. fixes a backport task #2099.
--
* 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]
--
* parse.y (dyna_push_gen): use rb_node_newnode() for ripper.
[ruby-core:26961]
--
* parse.y (dyna_push_gen, dyna_pop_gen): no needs to save both of
args and vars. [ruby-core:26961]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_syntax.rb')
-rw-r--r-- | bootstraptest/test_syntax.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb index 131625ea6b..2e8639b3f4 100644 --- a/bootstraptest/test_syntax.rb +++ b/bootstraptest/test_syntax.rb @@ -831,3 +831,49 @@ assert_normal_exit %q{ assert_equal 'ok', %q{ "#{}""#{}ok" }, '[ruby-dev:38968]' + + +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 |