michaeljbishop / mulligan

Elegant, Ruby-ish Restartable Exceptions for Ruby (like Lisp's "Restarts")
http://michaeljbishop.github.io/mulligan/
MIT License
8 stars 0 forks source link

Make sure `Mulligan::Kernel#raise`establishes the current frame to be that of the caller #4

Closed michaeljbishop closed 10 years ago

michaeljbishop commented 10 years ago

Because Mulligan::Kernel#raise calls super (Kernel#raise), stack traces in the exception have a little extra at the end. Not only that, but tools like interception rely on the assumption that the current stack frame is the one just before the call to #raise.

Mulligan can take care of these by implementing it's version of #raise as a C-extension. To see how this is done, look at the call to rb_f_raise() -- in eval.c.

michaeljbishop commented 10 years ago

https://github.com/michaeljbishop/mulligan/pull/5