From: Geoff Stanley Date: 2006-05-22T22:58:21+09:00 Subject: IRB'ing within a program 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! -- Posted via http://www.ruby-forum.com/.