[ruby-cvs:68045] yui-knk:r60864 (trunk): parse.y: Set the last location of NODE_ARRAY in %i

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Tue Nov 21 07:48:06 JST 2017


yui-knk	2017-11-21 07:48:05 +0900 (Tue, 21 Nov 2017)

  New Revision: 60864

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60864

  Log:
    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)
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list