diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-23 00:05:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-23 00:05:30 +0000 |
commit | dfec9d978804fbd53df9e6b93e5801985b2b3130 (patch) | |
tree | ebaa6503d450bcc3653dcfddd608f4a3e852ebab /test/ruby | |
parent | 28e866d7bb732c3dd0e5273a6b143ac73dff1373 (diff) | |
download | ruby-dfec9d978804fbd53df9e6b93e5801985b2b3130.tar.gz |
parse.y: pop cmdarg
* parse.y (lambda_body): pop cmdarg stack for lookahead
token. [ruby-core:70067] [Bug #11380]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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 189cf1358d..158c12d9b6 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -414,6 +414,11 @@ WARN assert_valid_syntax('p ->() do a() do end end', bug11107) end + def test_do_block_after_lambda + bug11380 = '[ruby-core:70067] [Bug #11380]' + assert_valid_syntax('p -> { :hello }, a: 1 do end', bug11380) + end + def test_reserved_method_no_args bug6403 = '[ruby-dev:45626]' assert_valid_syntax("def self; :foo; end", __FILE__, bug6403) |