ruby-changes:48752
From: yui-knk <ko1@a...>
Date: Tue, 21 Nov 2017 08:58:48 +0900 (JST)
Subject: [ruby-changes:48752] yui-knk:r60868 (trunk): parse.y: Fix the last location of NODE_STR in %w
yui-knk 2017-11-21 08:58:42 +0900 (Tue, 21 Nov 2017) New Revision: 60868 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60868 Log: parse.y: Fix the last location of NODE_STR in %w * parse.y: Use @2 to only include a range of tSTRING_CONTENT. e.g. The locations of NODE_STR is fixed: ``` %w[a] ``` * Before ``` NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 5) ``` * After ``` NODE_STR (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 4) ``` Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 60867) +++ parse.y (revision 60868) @@ -4101,7 +4101,7 @@ qword_list : /* none */ https://github.com/ruby/ruby/blob/trunk/parse.y#L4101 | qword_list tSTRING_CONTENT ' ' { /*%%%*/ - $2->nd_loc = @$; + $2->nd_loc = @2; $$ = list_append($1, $2, &@$); /*% $$ = dispatch2(qwords_add, $1, $2); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/