mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
parse.y: Set the last location of NODE_ARRAY in %w
* parse.y: list_append uses the locations of the second argument. So we should set the locations of $2 before pass it to list_append. e.g. The locations of NODE_ARRAY is fixed: ``` %w[a b] ``` * Before ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 0, last_column: -1) ``` * After ``` NODE_ARRAY (line: 1, first_lineno: 1, first_column: 0, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
29317b1c38
commit
1bf50894ef
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -4101,8 +4101,8 @@ qword_list : /* none */
|
||||||
| qword_list tSTRING_CONTENT ' '
|
| qword_list tSTRING_CONTENT ' '
|
||||||
{
|
{
|
||||||
/*%%%*/
|
/*%%%*/
|
||||||
$$ = list_append($1, $2, &@$);
|
|
||||||
$2->nd_loc = @$;
|
$2->nd_loc = @$;
|
||||||
|
$$ = list_append($1, $2, &@$);
|
||||||
/*%
|
/*%
|
||||||
$$ = dispatch2(qwords_add, $1, $2);
|
$$ = dispatch2(qwords_add, $1, $2);
|
||||||
%*/
|
%*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue