From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-11-07T04:05:46+09:00 Subject: Re: How to get ruby interactive when some condition or error ocurred? In article <20021106134943.GQ17694@ns>, Paul Duncan wrote: > >--FCF9ydJxlAJsfRTu >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >* Radek Hnilica (Radek@Hnilica.CZ) wrote: >> Hello, >>=20 >> I'm thinking of, and looking for way to start interactive session from >> running program, when some limit condition, or an error ocurred. I >> still can't find a way how to do it. >>=20 >> Something like >> ... >> # some code >> start_interactive_session if flag >> ... > >require 'irb' > ># some code ># ... >IRB::start $STDIN if flag > > Interesting. However I tried the following to see if control returns to the script after exiting irb: require 'irb' # some code # ... IRB::start $STDIN if flag puts "Okie dokey" I neve saw "Okie dokey" after exiting irb. Is there any way to do that? Phil