[ruby-cvs:68638] ko1:r61457 (trunk): Set first line numbers for empty iseqs.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Mon Dec 25 09:27:17 JST 2017


ko1	2017-12-25 09:27:17 +0900 (Mon, 25 Dec 2017)

  New Revision: 61457

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

  Log:
    Set first line numbers for empty iseqs.
    
    * compile.c (iseq_compile_each): for empty method, block and so on,
      `last_line` is not set so that line number of `putnil` instruction
      will be zero. This patch set `first_lineno` for such `putnil`.
    
      Problem is reported by deivid-rodriguez via Yuichiro Kaneko.
    
    * test/ruby/test_iseq.rb: add a test for this spec.

  Modified files:
    trunk/compile.c
    trunk/test/ruby/test_iseq.rb


More information about the ruby-cvs mailing list