From: Brian Candler Date: 2009-09-02T06:20:21+09:00 Subject: Re: Error with an array of strings 7stud -- wrote: > $ ri Kernel#gets > > ------------------------------------------------------------ Kernel#gets > gets(separator=$/) => string or nil > ------------------------------------------------------------------------ > Returns (and assigns to +$_+) the next line from the list of files > in +ARGV+ (or +$*+), or from standard input if no files are present > on the command line. > > > So you can just use gets instead of STDIN.gets. But only if you never put any arguments on the command line. STDIN.gets is safer for exactly this reason, when you actually want to read from STDIN. -- Posted via http://www.ruby-forum.com/.