From: Peter Vandenabeele Date: 2011-09-29T21:55:51+09:00 Subject: Re: IO.readlines will not accept variable with file name Why? --0016369fa10a2826d104ae140759 Content-Type: text/plain; charset=UTF-8 On Thu, Sep 29, 2011 at 2:09 PM, Brian Candler wrote: > Peter Vandenabeele wrote in post #1024204: > > On Thu, Sep 29, 2011 at 11:56 AM, Robert Klemme > > wrote: > > > >> > filearray = IO.readlines(filename) > >> > > >> Insert a line after "gets" like this: > >> > > I am not sure. > > > > I think it is a simple typo in that > > > > filename1 (with a digit) > > > > is asked by the get, but > > > > filename (without a digit) > > > > is used in the call to IO.readlines. > > > > IMHO, the code as shown above could never work with that typo ... > > Yes, but if that were the case the error wouldn't be Errno::ENOENT. > Ah thanks, Peter --0016369fa10a2826d104ae140759--