1.8.7 release engineering: Browse | Submit New | Admin

[#18749] Ruby 1.8.6 return line numbers wrong

Date:
2008-03-11 09:29
Priority:
3
Submitted By:
Rocky Bernstein (rockyb)
Assigned To:
Nobody (None)
Category:
None
State:
Closed
Summary:
Ruby 1.8.6 return line numbers wrong

Detailed description
Consider this program:

  def first
    x = 0
    1
  end
  first

Running a trace on this:


$ ruby -rtracer /tmp/bug.rb
#0:/tmp/bug.rb:1::-: def first
#0:/tmp/bug.rb:1:Module:>: def first
#0:/tmp/bug.rb:1:Module:<: def first
#0:/tmp/bug.rb:5::-: first
#0:/tmp/bug.rb:1:Object:>: def first
#0:/tmp/bug.rb:2:Object:-:   x = 0
#0:/tmp/bug.rb:3:Object:-:   1
#0:/tmp/bug.rb:2:Object:<:   x = 0


Notice that we give a line trace for line 3 but the return line number which follows that goes back to line 2. 

Ruby version: ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux]

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-03-13 01:50
Sender: Rocky Bernstein

Fixed in SVN commit 15761. [ruby-core:15855]

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2008-03-13 01:50rockyb
resolution_idNone2008-03-13 01:50rockyb
close_date2008-03-13 01:502008-03-13 01:50rockyb