diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 00:28:29 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-12 00:28:29 +0000 |
commit | 0b31ce0047513d1eb8f9902286215025a3742bf5 (patch) | |
tree | d9996a2ff57a02ff19c8e11a4b207f6e8b454d47 /parse.y | |
parent | 9b1d8ab7d0ab45a81dcd682accd1b5d3441fec25 (diff) |
parse.y: Fix locations of NODE_ARRAY in NODE_CALL(:=~)
* parse.y (match_op_gen): Fix to only include a range of node2.
e.g. The locations of the NODE_ARRAY is fixed:
```
re =~ s1
```
* Before
```
NODE_ARRAY (line: 1, code_range: (1,0)-(1,8))
```
* After
```
NODE_ARRAY (line: 1, code_range: (1,6)-(1,8))
```
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -9306,7 +9306,7 @@ match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2, const YYLTY } } - n = new_call(node1, tMATCH, new_list(node2, location), location); + n = new_call(node1, tMATCH, new_list(node2, &node2->nd_loc), location); nd_set_line(n, line); return n; } |