diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-17 01:22:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-17 01:22:26 +0000 |
commit | 413e2eda70eeb524864ee72058c9835c412d63f6 (patch) | |
tree | 92a52b64fe4beb45c51cbb4bc763888f9fcdf40a /test | |
parent | 1331979da521f449c7cfb39de417ed9ed2b9a51c (diff) | |
download | ruby-413e2eda70eeb524864ee72058c9835c412d63f6.tar.gz |
parse.y: fix cmdarg in command_args
* parse.y (call_args): fix invalid CMDARG state after command_args
followed by tLBRACE_ARG. [ruby-core:86551] [Bug #14690]
From: Ilya Bylich <ibylich@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_parse.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index b05dbe2a0f..6160aa1452 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1196,6 +1196,10 @@ x = __ENCODING__ end end + def test_cdmarg_after_command_args_and_tlbrace_arg + assert_valid_syntax('let () { m(a) do; end }') + end + =begin def test_past_scope_variable assert_warning(/past scope/) {catch {|tag| eval("BEGIN{throw tag}; tap {a = 1}; a")}} |