From: Joel VanderWerf Date: 2007-11-30T06:36:29+09:00 Subject: Re: Using irb as a REPL S. Robert James wrote: > Lisp programmers often use the REPL (similar to IRB) as a simple way > to make an interactive interface to their app. I'd like to do the > same thing with irb - that is, define my classes, and load irb in the > context. > > I can get about half way there: > > require 'irb' > IRB.start > my_class = MyClass.new(...) # I want this to be the context > irb my_class > > ...works, but you have to type "quit" to load. Is there a better way > to leverage IRB from within my code? What do the Ruby hackers say? (I > know a lot have a Lisp background, and so wouldn't want Ruby to not > have a REPL shell...) This might help: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/244139 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407