ruby-changes:48274
From: mame <ko1@a...>
Date: Tue, 24 Oct 2017 14:54:35 +0900 (JST)
Subject: [ruby-changes:48274] mame:r60389 (trunk): Remove special handling for (NODE*)1
mame 2017-10-24 14:54:30 +0900 (Tue, 24 Oct 2017) New Revision: 60389 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60389 Log: Remove special handling for (NODE*)1 The magic number was used to mark NODE_ATTRASGN when its receiver is self. But the hack was refactored at r46366. So the remaining code fragments are no longer needed. Modified files: trunk/node.c trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 60388) +++ parse.y (revision 60389) @@ -8806,7 +8806,6 @@ fixpos(NODE *node, NODE *orig) https://github.com/ruby/ruby/blob/trunk/parse.y#L8806 { if (!node) return; if (!orig) return; - if (orig == (NODE*)1) return; nd_set_line(node, nd_line(orig)); } Index: node.c =================================================================== --- node.c (revision 60388) +++ node.c (revision 60389) @@ -930,12 +930,7 @@ dump_node(VALUE buf, VALUE indent, int c https://github.com/ruby/ruby/blob/trunk/node.c#L930 ANN("attr assignment"); ANN("format: [nd_recv].[nd_mid] = [nd_args]"); ANN("example: struct.field = foo"); - if (node->nd_recv == (NODE *) 1) { - F_MSG(nd_recv, "receiver", "1 (self)"); - } - else { - F_NODE(nd_recv, "receiver"); - } + F_NODE(nd_recv, "receiver"); F_ID(nd_mid, "method name"); LAST_NODE; F_NODE(nd_args, "arguments"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/