mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove unnecessary assignments to local variables in strings
Local variables are not reassigned and are not needed.
This commit is contained in:
parent
5d6f76cf6e
commit
3260b0b647
Notes:
git
2025-01-21 11:25:55 +00:00
1 changed files with 4 additions and 7 deletions
11
parse.y
11
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 %*/
|
||||
}
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue