summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <[email protected]>2024-11-11 23:24:34 +0900
committerYudai Takada <[email protected]>2025-01-21 20:25:38 +0900
commit2b1db0faecf03d3fa1b7a1b102cc4c51aa962d5f (patch)
treecb57957b38dbade379d0c9eed53a75fe645a98e3
parent3260b0b6471ae0d7c31c1047550d8cc8afbfe63c (diff)
Remove unnecessary assignments to local variables in `f_arg_asgn`
Local variables are not reassigned and are not needed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12054
-rw-r--r--parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 304fa89e76..e15f59e146 100644
--- a/parse.y
+++ b/parse.y
@@ -6486,8 +6486,7 @@ f_norm_arg : f_bad_arg
f_arg_asgn : f_norm_arg
{
- ID id = $1;
- arg_var(p, id);
+ arg_var(p, $1);
$$ = $1;
}
;