summaryrefslogtreecommitdiff
path: root/test/ruby/test_syntax.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 15:42:08 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-21 15:42:08 +0000
commit02cc3d942a7fee753217ffa9382cd8f2ded1a440 (patch)
treefda7837aaf6bc6ec824111a607c6573d75fb1e4e /test/ruby/test_syntax.rb
parentadfa331bbc65dd82938f0f416b123afb85638520 (diff)
merge revision(s) 44449: [Backport #9416]
* 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_2_1@45086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_syntax.rb')
-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 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)