ruby-changes:57722
From: Aaron <ko1@a...>
Date: Thu, 12 Sep 2019 03:58:50 +0900 (JST)
Subject: [ruby-changes:57722] 14e3731059 (master): Make sure WB executes after object is reachable
https://git.ruby-lang.org/ruby.git/commit/?id=14e3731059 From 14e3731059246fcd093daa36fd0139d0287e633f Mon Sep 17 00:00:00 2001 From: Aaron Patterson <tenderlove@r...> Date: Wed, 11 Sep 2019 11:57:57 -0700 Subject: Make sure WB executes after object is reachable diff --git a/parse.y b/parse.y index 8d7fc69..bb4191d 100644 --- a/parse.y +++ b/parse.y @@ -2787,7 +2787,6 @@ primary : literal https://github.com/ruby/ruby/blob/trunk/parse.y#L2787 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 https://github.com/ruby/ruby/blob/trunk/parse.y#L2808 /* {|*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); /*% %*/ -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/