Ross Bamford
4/18/2006 5:58:00 PM
On Mon, 17 Apr 2006 22:51:29 +0100, Ben <laserbin@gmail.com> wrote:
> It should be simple, but I have not found the answer yet.
>
> How to run File1.rb under irb prompt?
>
> I can run script under DOS prompt:
>
> C:\> ruby File1.rb
>
> But how can I do this under irb prompt:
>
> irb(main):001:0> File1.rb <== did not work
> irb(main):001:0> File1 <== did not work
>
Not sure if this is what you're after, but you can pass a filename to irb
to have it executed line-by-line, e.g.:
irb File1.rb
--
Ross Bamford - rosco@roscopeco.remove.co.uk