From 11e5ebaba7340ab09f26686d17ce196facc251f7 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 20 Jul 2024 16:20:47 +0900 Subject: Fix SEGV on method call with empty args and brace block for do block command call --- test/ruby/test_syntax.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby') 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}')) -- cgit v1.2.3