diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -7832,8 +7832,14 @@ literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail) rb_gc_force_recycle((VALUE)head); head = tail; } + else if (NIL_P(tail->nd_lit)) { + list_concat(head, tail->nd_next); + rb_gc_force_recycle((VALUE)tail); + } else { - list_concat(head, NEW_ARRAY(tail)); + nd_set_type(tail, NODE_ARRAY); + tail->nd_head = NEW_STR(tail->nd_lit); + list_concat(head, tail); } break; |