On 7/17/06, Nicholas Seckar <nseckar / gmail.com> wrote:
> If you just want to load some code before irb starts, you can use -r
>
> cd /tmp
> echo 'puts 10' > startup.rb
> irb -r startup.rb
>
> If you'd like to stop execution in various places, take a look at
> ruby-breakpoint.
>
> On 7/17/06, Rick Ashton <expiation / devils.com> wrote:
> >
> > Hi
> >
> > Is there some sort of 'python -i' equivalent for ruby or irb? I can't
> > seem to find it. I know you can 'load' or 'require' a module, but I need
> > to load the file into the current scope. Currently all I seem to be able
> > to do is either code and run file, or copy and paste into irb if I
> > wanted the '-i' functionality. I'd really like to "enter interactive
> > mode after executing the script  or the command" as the python man page
> > puts it. It'll be enormously useful for testing and stuff. Sorry if it's
> > a rather n00b or repeated question, I couldn't search since the function
> > is "disabled due to technical problems".
> >
> > Thanks!
> >
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> >
>
>

As mentioned you can use breakpoint (excellect tool) and irb -r, also
don't forget you can use require and/or load from within irb as well
to load (and execute) a script.

pth