diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-27 15:42:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-27 15:42:49 +0000 |
commit | 04bb9d6b75a55d4000700769eead5a5cb942c25b (patch) | |
tree | 45a4c5a63b2f7d9aaa6c4db0b931f118a1ca1592 /test | |
parent | bb4a1ac9b02a7fd35a5c6cbc107cded94371fd69 (diff) | |
download | ruby-04bb9d6b75a55d4000700769eead5a5cb942c25b.tar.gz |
parse.y: save cmdarg_stack in local scope
* parse.y (local_push_gen, local_pop_gen): save cmdarg_stack to
isolate command argument state from outer scope.
[ruby-core:59342] [Bug #9308]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_syntax.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 04fcd20a56..cac755a390 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -256,6 +256,11 @@ WARN assert_valid_syntax("p begin 1.times do 1 end end", __FILE__, bug6419) end + def test_do_block_in_call_args + bug9308 = '[ruby-core:59342] [Bug #9308]' + assert_valid_syntax("bar def foo; self.each do end end", bug9308) + end + def test_reserved_method_no_args bug6403 = '[ruby-dev:45626]' assert_valid_syntax("def self; :foo; end", __FILE__, bug6403) |