Re:“Did you mean?” Experience in Ruby
by gcao on Thursday October 23, 2014 @11:21AM
(#8498591)
In pry is it possible to return something when I exit the REPL? Like this:
It might be very convenient if I put 'return binging.pry' just before the broken code. I can interactively fix the broken code and continue run outside of current method.
[ Parent
| on HN ]
If you are explicit: "return" in a Pry session will exit pry and return the value you pass to it, just as if you are in the method itself. So e.g. "return 42" would return 42 from do_something.