summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2025-11-13 12:45:09 +0900
committerYuichiro Kaneko <spiketeika@gmail.com>2025-11-14 10:23:35 +0800
commit560ec9bfd2d16dc1836335a36430d67861feb87e (patch)
treeda2bc2aae9e4ccbd0ddf5f4bdff9e2206035435c /parse.y
parent8a58e66a10b486923c63c8ba23d62740ecf98554 (diff)
Skip null check for `brace_block`
`brace_block` is `'{' brace_body '}'` or `k_do do_body k_end`. Both of them are not null so no need to check `$5`.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 1 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 00c5aef6d2..bca6e342ae 100644
--- a/parse.y
+++ b/parse.y
@@ -5224,10 +5224,7 @@ block_call : command do_block
{
if (NODE_EMPTY_ARGS_P($4)) $4 = 0;
$$ = new_command_qcall(p, $2, $1, $3, $4, $5, &@3, &@$);
- /*% ripper: command_call!($:1, $:2, $:3, $:4) %*/
- if ($5) {
- /*% ripper: method_add_block!($:$, $:5) %*/
- }
+ /*% ripper: method_add_block!(command_call!($:1, $:2, $:3, $:4), $:5) %*/
}
| block_call call_op2 operation2 command_args do_block
{