From: Hassan Schroeder Date: 2011-09-04T07:16:00+09:00 Subject: Re: opening a file with variable name On Sat, Sep 3, 2011 at 2:59 PM, Jeffrey Smith wrote: > I have tried File.open(variable), but I always get an error message stating "Invaild argument - path to file (Errno::EINVAL). ruby-1.9.2-p290 > variable = "foo.txt" => "foo.txt" ruby-1.9.2-p290 > File.open(variable) => # ruby-1.9.2-p290 > In the above case I know there's a file with that name in the same directory where I started irb. Maybe you should look at what your variable actually contains... -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan