On Tue, 26 Dec 2000, craig duncan wrote:

> John Rubinubi wrote:
> > 
> > Thanks. That did it. Here's another, no doubt equally stupid question.
> > 
> > On p. 16 of Programming Ruby is given
> > 
> > ARGF.each {|line| print line  if line =~/Ruby/ }
> > 
> > which is supposed to print the inputted lines which contain "Ruby"
> > 
> > The while loop example in the book runs as expected but this ARGF
> > one-liner doesn't seem to do anything.
> > 
> > Thanks,
> > 
> > John
> 
> Now i know what ARGF is (after looking it up).  It's an alias for $< . .
> . which means that it's the concatentation of the input files to your
> program specified on the command line (or standard input if no files are
> specified on command line).  Your one liner does work for me.  If you
> don't specify any files on the command line, it reads from standard
> input and echoes every line that you enter that contains "Ruby" in it. 


It still crashes for me. I'll upload the file on the next line.

ARGF.each {|line| print line if line =~/Ruby/}

so that is the uploaded file which crashes. I have to ctrl/alt/del to stop
it. It doesn't even ask for input. Does it work for any rubywin user?

Here's another question.

How to stop a program under windows?? Is there a way besides
ctrl-alt-del???