From: Michael Neumann Date: 2002-02-07T03:22:31+09:00 Subject: Re: Easy way to interactively use Ruby with program Brett Williams wrote: > So I've read through the pickaxe book's chapter on extending Ruby, and the > appendix on irb... but I still haven't figured out how to do exactly what I > want to do (probably my fault... but maybe someone can help me). > > What I wish to do is so simple that I'm sure there is a good established way > to do it. > > I have a ruby program (it calls C libraries etc... does lots of stuff). > What I would like to do is to be able to call irb such that when the program > finishes, the user is left with a command prompt, and has access to > everything as if he had called the loads/requires methods etc. that the > program did himself. > > Basically, the program needs to do a lot of startup work, and then give > control of the program to the user, with all modules, classes, variables, > and methods available at the prompt. > > It seems like there should just be something like irb -f