From: Brett Williams Date: 2002-01-15T13:10:35+09:00 Subject: Re: Easy way to interactively use Ruby with program "Bill Kelly" wrote in message news:007b01c19d1e$6595f270$eaa0a118@musicbox... > > From: "Brett Williams" > > > The previous tip from Bill Kelly, to run IRB.start at the end of the script > > unfortunately didn't work either. I can't seem to get IRB to work properly > > without it trying to open some kind of file. Perhaps I should mention I am > > working with a fairly recent CVS snapshot (irb/main didn't even load). > > D'oh! Interesting. I'm using ruby 1.6.2 (2000-12-18) [i386-cygwin] > for what it's worth. . . > > Have a look at your 'irb' shell script (or irb.bat batch file) to > find out how it goes about launching irb? That's where I got the > require "irb/main"; IRB.start . . . . Sounds like it must be done > somehow differently in later versions? That was what I first tried (although I was trying it at the start of the program). require 'irb' IRB.start(__FILE__) is how it is started on my version, recent cvs snapshot so I think it is 1.7.2 or so, i686-linux. I can't get this to work either... I've tried many things. I tried passing it an empty file, tried passing it __FILE__ (that wasn't very promising as my code would've ran already), but the ARGV to IRB is giving me fits. I think I could get it to work by calling Irb.new but that is private...