Please to announce the release of remembered_evals 0.0.4
Wasn’t sure if anything like it existed, so wrote this gem.
A library to make debugging eval’ed code possible.
This library monkey patches Kernel.*eval to save eval’ed code to a cache
file before evaluating it (files saved to
You can thus debug [ex: using ruby-debug] THROUGH eval’ed code, now, as
well as see appropriate (useful) eval’ed code lines in exception
backtraces, instead of just eval(2) as the line number in the backtrace.
It also offers an additional tool for developers: Since it saves code
by hash value, and doesn’t write over cached files, you can actually
edit eval’ed blocks and it will eval the edited version–i.e. it allows
you to override certain strings passed to eval [it uses yours instead of
the original]-- quite useful for debugging purposes if you use
gem sources -a http://gems.github.com # if necessary
gem install rogerdpack-remembered_evals # may need to precede with sudo
And enjoy the eval’ed code bliss.
Feedback welcome rogerdpack @ github