From fd0e9d2580bf757071683581d34354064c6ceb6a Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 30 Apr 2015 07:22:19 +0000 Subject: parse.y: push cmdarg_stack * parse.y (lambda): push and reset cmdarg_stack in lambda body. [ruby-core:69017] [Bug #11107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_syntax.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_syntax.rb') diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 0274a11e83..dbb18164f4 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -400,6 +400,11 @@ WARN assert_valid_syntax("bar def foo; self.each do end end", bug9308) end + def test_do_block_in_lambda + bug11107 = '[ruby-core:69017] [Bug #11107]' + assert_valid_syntax('p ->() do a() do end end', bug11107) + end + def test_reserved_method_no_args bug6403 = '[ruby-dev:45626]' assert_valid_syntax("def self; :foo; end", __FILE__, bug6403) -- cgit v1.2.1