Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

line number wrongly shown as zero in backtrace #28

Open
betelgeuse opened this issue Jun 4, 2012 · 3 comments
Open

line number wrongly shown as zero in backtrace #28

betelgeuse opened this issue Jun 4, 2012 · 3 comments
Labels

Comments

@betelgeuse
Copy link

(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
Copy link
Owner

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

@betelgeuse
Copy link
Author

https://gist.github.com/2870912

You can get to the add_stub from there.

@cldwalker
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants