Project

General

Profile

« Previous | Next » 

Revision 45100dbe

Added by yui-knk (Kaneko Yuichiro) over 7 years ago

parse.y: Set the last location of NODE_ARRAY in %i

  • 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:

%i[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@60864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e