From: William James Date: 2007-08-18T03:04:58+09:00 Subject: Re: Help with Arrays... On Aug 17, 3:49 am, "Robert Klemme" wrote: > I'd rather do this because the test is much easier: > > words = [] > > while ( line = gets ) > words << line.chomp > end The original poster wants the loop to end when the user presses without entering any text. How about this? words = [] while line = gets and line.chomp! != "" words << line end