debugger statements just work as long as ruby-debug is installed
otherwise you get warned, but not fired
Great news David, but I have a question.
I’ve always found that when stopping at a debugger statement,
the debugger’s “where” statement shows no stack trace. This
is because the debugger didn’t installed its hook until it
was called, which is too late. The work-around I found was
to call Debugger.start somewhere in global scope, but after
ruby-debug had been required.
The workaround is painful, and I was considering asking that
the “-d”/"–debugger" option should do it… not possible now
that you’ve removed the option!
Is there any way to get the initial stack trace to work correctly?
Perhaps add “-d” again to support this case?
Made several small optimizations that all add up to a considerable improvement
in performance. Using a simple benchmark:
generate 5000 example groups,
each with one example,
each with one passing expectation
Unfortunately, this isn’t enough of a benchmark. You really should to
generate both the positive and negative cases as error handling often
incurs a lot of extra overhead.
You can see my numbers for positive and negative (against rspec 2.0 and
1.x, and a bunch of other test frameworks) here:
My test suite (MRI 1.9.2p0) with 3300 examples went from 7.4s under 2.1.0 to
3.2s with 2.2.1. Most excellent!
Glad to hear it. My benchmarks were based on an essentially empty spec
suite (so no overhead from the implementation code). Hearing that with a
real app we’re still getting 1k examples per second makes me very happy
I’m assuming, however, this is not a Rails app, correct?
My test suite (MRI 1.9.2p0) with 3300 examples went from 7.4s under 2.1.0 to
3.2s with 2.2.1. Most excellent!
Glad to hear it. My benchmarks were based on an essentially empty spec suite (so
no overhead from the implementation code). Hearing that with a real app we’re
still getting 1k examples per second makes me very happy I’m assuming, however,
this is not a Rails app, correct?
Correct, this is not a rails app. I write straight-up ruby code.
cr
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.