Make sure WB executes after object is reachable

This commit is contained in:
Aaron Patterson 2019-09-11 11:57:57 -07:00
parent 1febb6f4a1
commit 14e3731059
No known key found for this signature in database
GPG Key ID: 953170BCB4FFAFC6

View File

@ -2787,7 +2787,6 @@ primary : literal
NODE *args, *scope, *internal_var = NEW_DVAR(id, &@2);
ID *tbl = ALLOC_N(ID, 3);
VALUE tmpbuf = rb_imemo_tmpbuf_auto_free_pointer(tbl);
RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
tbl[2] = tmpbuf;
@ -2809,6 +2808,7 @@ primary : literal
/* {|*internal_id| <m> = internal_id; ... } */
args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &@2), &@2);
scope = NEW_NODE(NODE_SCOPE, tbl, $5, args, &@$);
RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
$$ = NEW_FOR($4, scope, &@$);
fixpos($$, $2);
/*% %*/