aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-30 07:22:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-30 07:22:19 +0000
commitfd0e9d2580bf757071683581d34354064c6ceb6a (patch)
tree20036be1fd5c0d5756a3222f13d6338965d2c5c6 /test
parent5d071fe3818f94b90559f2b5328c009553fc5a11 (diff)
downloadruby-fd0e9d2580bf757071683581d34354064c6ceb6a.tar.gz
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
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 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)