Hi --

Gavin Sinclair <gsinclair / soyabean.com.au> writes:

> I'd like to be able to write a program that, halfway through
> execution, stops what it's doing and opens an irb session with the
> current state.  This would be an excellent tool for debugging.
> 
> Does anyone know if it's possible?  My instinct says it's probably
> not.  If that's the case, I'd like to if some modification to Ruby
> could make it possible, to feed into a potential RCR.

$ ruby -e 'require "irb"; print "irb? "; IRB.start if /y/.match(gets)'
irb? yes
irb(main):001:0>

New scope, of course, but still running same program.  I don't know
that there's any way to get local variables involved, except maybe
grabbing the binding directly.


David

-- 
David A. Black
dblack / wobblini.net