summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-10 16:41:34 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-11 16:01:18 +0900
commit655c65d65b75a6ac733dfb8e42437e7c43b7cfe1 (patch)
tree7d96aec0171f92159bef1e4ffc273b94f2129d32 /parse.y
parent489676bd2049c0a8c9949bf09d3dfb2730a29736 (diff)
&$$->nd_lit is uninitialized at this point
See also https://travis-ci.org/ruby/ruby/jobs/583031687#L1874
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2444
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 1ba07b4133..f384679a83 100644
--- a/parse.y
+++ b/parse.y
@@ -4608,7 +4608,7 @@ numeric : simple_numeric
{
/*%%%*/
$$ = $2;
- RB_OBJ_WRITTEN(p->ast, &$$->nd_lit, $$->nd_lit = negate_lit(p, $$->nd_lit));
+ RB_OBJ_WRITE(p->ast, &$$->nd_lit, negate_lit(p, $$->nd_lit));
/*% %*/
/*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
}
@@ -5185,7 +5185,7 @@ assoc : arg_value tASSOC arg_value
/*%%%*/
if (nd_type($1) == NODE_STR) {
nd_set_type($1, NODE_LIT);
- RB_OBJ_WRITTEN(p->ast, &$1->nd_lit, $1->nd_lit = rb_fstring($1->nd_lit));
+ RB_OBJ_WRITE(p->ast, &$1->nd_lit, rb_fstring($1->nd_lit));
}
$$ = list_append(p, NEW_LIST($1, &@$), $3);
/*% %*/