From d9119202441f5ba45fcda9771cf57a2e70b2bcb5 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 20 Nov 2017 23:58:42 +0000 Subject: 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) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.y b/parse.y index 693df138e8..8ea297f076 100644 --- a/parse.y +++ b/parse.y @@ -4101,7 +4101,7 @@ qword_list : /* none */ | qword_list tSTRING_CONTENT ' ' { /*%%%*/ - $2->nd_loc = @$; + $2->nd_loc = @2; $$ = list_append($1, $2, &@$); /*% $$ = dispatch2(qwords_add, $1, $2); -- cgit v1.2.3