Project

General

Profile

Bug #15052 ยป do-not-optimize-keyword-argument-with-empty-hash.patch

mame (Yusuke Endoh), 08/31/2018 12:07 PM

View differences:

parse.y
/* DSTAR */
tail = tail->nd_next->nd_head->nd_head;
}
assocs = list_concat(assocs, tail);
if (tail) assocs = list_concat(assocs, tail);
}
$$ = assocs;
/*% %*/
......
| tDSTAR arg_value
{
/*%%%*/
if (nd_type($2) == NODE_HASH &&
!($2->nd_head && $2->nd_head->nd_alen))
$$ = 0;
else
$$ = list_append(p, NEW_LIST(0, &@$), $2);
$$ = list_append(p, NEW_LIST(0, &@$), $2);
/*% %*/
/*% ripper: assoc_splat!($2) %*/
}
    (1-1/1)