diff options
author | yui-knk <[email protected]> | 2024-07-20 16:20:47 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-07-21 11:02:38 +0900 |
commit | 11e5ebaba7340ab09f26686d17ce196facc251f7 (patch) | |
tree | 56516f9a8ac37ed3c660cc4f3ad3a2f0a8189b2e /test/ruby | |
parent | e7dda086170a5eaa037ddd5ebfcdc3aade15a26d (diff) |
Fix SEGV on method call with empty args and brace block for do block command call
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11215
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_syntax.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 8aa3a54084..dc752d5d8a 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1829,6 +1829,10 @@ eom assert_valid_syntax('a.b (;),(),()', bug19281) end + def test_command_do_block_call_with_empty_args_brace_block + assert_valid_syntax('cmd 1, 2 do end.m() { blk_body }') + end + def test_numbered_parameter assert_valid_syntax('proc {_1}') assert_equal(3, eval('[1,2].then {_1+_2}')) |