ruby-changes:53756
From: yui-knk <ko1@a...>
Date: Sun, 25 Nov 2018 21:31:43 +0900 (JST)
Subject: [ruby-changes:53756] yui-knk:r65973 (trunk): Fix locations of NODE_UNDEF in undef with multiple args
yui-knk 2018-11-25 21:31:35 +0900 (Sun, 25 Nov 2018) New Revision: 65973 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65973 Log: Fix locations of NODE_UNDEF in undef with multiple args * parse.y: Fix the beginning position of trailing NODE_UNDEF. e.g. The location of the NODE_UNDEF for `b` is fixed: ``` undef a, b ``` * Before ``` NODE_UNDEF (line: 1, location: (1,6)-(1,10)) ``` * After ``` NODE_UNDEF (line: 1, location: (1,9)-(1,10)) ``` Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 65972) +++ parse.y (revision 65973) @@ -1784,7 +1784,7 @@ undef_list : fitem https://github.com/ruby/ruby/blob/trunk/parse.y#L1784 | undef_list ',' {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem { /*%%%*/ - NODE *undef = NEW_UNDEF($4, &@$); + NODE *undef = NEW_UNDEF($4, &@4); $$ = block_append(p, $1, undef); /*% %*/ /*% ripper: rb_ary_push($1, get_value($4)) %*/ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/