On 5/22/06, Geoff Stanley <geoffstanley / gmail.com> wrote: > Hello all > > I'm hoping someone has a better idea as to how to do this than I. What > I'm looking to do, essentially, is start a new irb session within a ruby > program. This program would get input from the user, feed that input to > a the irb session that it creates (and it could recreate it everytime a > specific input is given from the user, such as "/irb_clear"), then > return the result from irb. > > The program might look like this: > > require "irb" > while input = gets.chomp do > case input > when /^\/exit.*/ > break > when /^\/irb_clear.*/ > # Clear irb history > when /^\/irb\s+(.*)$/ > #send $1 to irb, then puts the result. > end > end > > Let me know if any of this is confusing and needs further explaining. > Thanks! Breakpoint! Breakpoint! It's extremely useful. http://rubyforge.org/projects/ruby-breakpoint/ There's even a gem: ruby-breakpoint Les