From 3260b0b6471ae0d7c31c1047550d8cc8afbfe63c Mon Sep 17 00:00:00 2001 From: ydah Date: Mon, 11 Nov 2024 23:22:36 +0900 Subject: Remove unnecessary assignments to local variables in `strings` Local variables are not reassigned and are not needed. --- parse.y | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/parse.y b/parse.y index c98db458d3..304fa89e76 100644 --- a/parse.y +++ b/parse.y @@ -5927,14 +5927,11 @@ literal : numeric strings : string { - NODE *node = $1; - if (!node) { - node = NEW_STR(STRING_NEW0(), &@$); + if (!$1) { + $$ = NEW_STR(STRING_NEW0(), &@$); + } else { + $$ = evstr2dstr(p, $1); } - else { - node = evstr2dstr(p, node); - } - $$ = node; /*% ripper: $:1 %*/ } ; -- cgit v1.2.3