From: Brian Candler Date: 2007-02-10T23:07:17+09:00 Subject: Re: Your favorite bit of ruby code? On Sat, Feb 10, 2007 at 08:10:52AM +0900, Marcello Barnaba wrote: > require 'irb' > > module IRB > def IRB.start_in_binding(b) > setup(nil) > irb = IRB::Irb.new(WorkSpace.new(b)) > @CONF[:MAIN_CONTEXT] = irb.context > catch(:IRB_EXIT) { irb.eval_input } > end > end I've no idea how this works; it has to rate as cool Ruby, even if it isn't implemented in Ruby :-) http://tryruby.hobix.com/