From: "S. Robert James" Date: 2007-11-20T08:35:00+09:00 Subject: Re: Using irb as a REPL On Nov 19, 6:21 pm, "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...) Another, similar problem with the above: irb my_class conf.prompt_mode = :SIMPLE # This line is ignored