[ruby-cvs:67762] yui-knk:r60581 (trunk): Use nd_lineno instead of nd_line for branch coverages

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Tue Oct 31 08:44:42 JST 2017


yui-knk	2017-10-31 08:44:42 +0900 (Tue, 31 Oct 2017)

  New Revision: 60581

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

  Log:
    Use nd_lineno instead of nd_line for branch coverages
    
    * compile.c (compile_if, compile_case, compile_loop, iseq_compile_each0):
      Use nd_lineno of nodes for branch coverages.
      nd_lineno is not adjusted line number of nodes.
      Sometimes nd_line is adjusted by fixpos. These
      adjustments lead to confusing result.
    
      For example, lineno of NODE_IF is 1, but
      line is 2 (line number is one-based).
    
      ```
      ;;;;;;;;;;;;;;;;;;;;if
        1 + 1
        2
      end
      ```

  Modified files:
    trunk/compile.c


More information about the ruby-cvs mailing list