Giter Club home page Giter Club logo

Comments (12)

timcharper avatar timcharper commented on June 14, 2024

This is a bug I ran into too. It's caused because Rsepc is actually putting it's debugger method in Object, instead of Kernel. (and Object instance methods take precedence over Kernel ones).

This patch resolves the issue for me:

http://github.com/timcharper/rspec-core/commit/c476e088ebabb4a89c8566be4fa07849d88271ac

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Merged: http://github.com/rspec/rspec-core/commit/5443fa859bc1912f9c1fcb377d3da51354c2a11c

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Turns out that didn't really solve the problem, but this did: http://github.com/rspec/rspec-core/commit/99727ba70461ee921fbdff5b84e514a6dca83635

from rspec-core.

timcharper avatar timcharper commented on June 14, 2024

Weird.. the patch certainly solved the problem for me.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Tim - the experience I had was that when I had a debugger statement but did not include the -d flag, I got an undefined method error on debugger. This is because ruby-debug gets required after the kernel extensions do, so at the time the kernel extensions get loaded, the unless defined? test fails.

Make sense?

from rspec-core.

timcharper avatar timcharper commented on June 14, 2024

What you say makes sense, but why it didn't work doesn't.

I used the debugger w/out the -d flag. I have a textmate snippet that does "require 'ruby-debug'; debugger"... and it worked perfectly fine.

But, at any rate, I trust your sanity, and therefore your claim that it was still broken. Thank you very much for your work on RSpec!

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

I'm guessing the textmate snippet loaded ruby-debug before rspec loaded, so what you describe makes sense. Make sense?

from rspec-core.

timcharper avatar timcharper commented on June 14, 2024

Unlikely, I stuck it right in the middle of an example.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Not sure what's different in our environments but it works for me now as I expect and it didn't before. Can you do me a favor and pull the latest, build the gem and make sure it's working as you expect?

from rspec-core.

timcharper avatar timcharper commented on June 14, 2024

Works just great here! Thank you.

from rspec-core.

dchelimsky avatar dchelimsky commented on June 14, 2024

Great. Thanks Tim.

from rspec-core.

mikesmullin avatar mikesmullin commented on June 14, 2024

also, if you are using bundler, make sure you have included the 'ruby-debugger19' under test env in your Gemfile, or it won't be included by rspec -d.

from rspec-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.