From: "G.Durga Prasad" Date: 2008-09-24T23:29:34+09:00 Subject: Re: Strange ruby problem ------=_Part_80749_32172097.1222266584442 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline try without the last line, line = gets On Wed, Sep 24, 2008 at 7:49 PM, christoforever@gmail.com < christoforever@gmail.com> wrote: > So i've cut the program down to about 4 lines to give the idea of > whats going on: > > num = ARGV[0] > num2 = ARGV[1] > puts " #{num} #{num2} \n" > line = gets > > > if i give the program some input from the command line it fails and > sais " gets: No such file or directory -1" > yet if i supply no input the program goes straight to gets. This seems > fairly strange to me. Though when I did this: > > num = ARGV[0] > num2 = ARGV[1] > puts " #{num} #{num2} \n" > STDOUT.flush > line = STDIN.gets > > everything works normal. Why is this and whats going on? Thanks in > advance > > Sincerely, > Chris Dancy > > ------=_Part_80749_32172097.1222266584442--