cldwalker / debugger

port of ruby-debug that works on 1.9.2 and 1.9.3
BSD 2-Clause "Simplified" License
846 stars 80 forks source link

line number wrongly shown as zero in backtrace #28

Open betelgeuse opened 12 years ago

betelgeuse commented 12 years ago
(rdb:1) backtrace
--> #0 RSpec::Mocks::MethodDouble.add_stub(error_generator#RSpec::Mocks::ErrorGe...,...) 
       at line /Users/betelgeuse/.rvm/gems/ruby-1.9.3-p194/gems/rspec-mocks-2.10.1/lib/rspec/mocks/method_double.rb:155
    #1 RSpec::Mocks::Proxy.add_stub(location#String, method_name#Symbol) 
       at line /Users/betelgeuse/.rvm/gems/ruby-1.9.3-p194/gems/rspec-mocks-2.10.1/lib/rspec/mocks/proxy.rb:0
    #2 RSpec::Mocks::Methods.stub(message_or_hash#Symbol) 
       at line /Users/betelgeuse/.rvm/gems/ruby-1.9.3-p194/gems/rspec-mocks-2.10.1/lib/rspec/mocks/methods.rb:35

Here proxy.rb is really calling from line 78 so the line number in the backtrace is wrong.

cldwalker commented 12 years ago

This looks like a bug. Can I get a Gemfile or bare minimum app that reproduces this?

betelgeuse commented 12 years ago

https://gist.github.com/2870912

You can get to the add_stub from there.

cldwalker commented 12 years ago

Thanks for the bug report. Patches welcome until I can get to this :)