summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 03:55:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-29 03:55:32 +0000
commit0e58730795a865a03ef5e08eccd428bd12e33f96 (patch)
tree05ba2aec9c5e127414cff0e8a2f20b23aaf97ce4 /test
parentee646af29d8eb77db3d1face3d0b912e22720c87 (diff)
merge revision(s) 44449: [Backport #9308]
* 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/branches/ruby_1_9_3@44737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_syntax.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index d924679c7f..a65b567153 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -55,6 +55,11 @@ class TestSyntax < Test::Unit::TestCase
f.close!
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)