ruby-changes:57569
From: Aaron <ko1@a...>
Date: Fri, 6 Sep 2019 02:20:20 +0900 (JST)
Subject: [ruby-changes:57569] 429ed8d587 (master): Don't change DSTR nodes to ARRAY nodes
https://git.ruby-lang.org/ruby.git/commit/?id=429ed8d587 From 429ed8d587423414fbbf2f562479c69562d52598 Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 4 Sep 2019 14:37:13 -0700 Subject: Don't change DSTR nodes to ARRAY nodes DSTR nodes are allocated in to the "markable" bucket where ARRAY nodes are not. Switching buckets can cause errors during GC. diff --git a/parse.y b/parse.y index 811c668..7a0bbe0 100644 --- a/parse.y +++ b/parse.y @@ -9611,9 +9611,7 @@ literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *l https://github.com/ruby/ruby/blob/trunk/parse.y#L9611 goto append; } else { - nd_set_type(tail, NODE_ARRAY); - tail->nd_head = NEW_STR(tail->nd_lit, loc); - list_concat(head, tail); + list_concat(head, NEW_NODE(NODE_ARRAY, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc)); } break; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/