From: Sebastian Hungerecker Date: 2007-12-23T03:00:21+09:00 Subject: Re: no method error (because of unknown variable type) Haris Bogdanovic wrote: > I get an error message that eof method is undefined. > I presume that this is because ruby does not know that the "file" variable > is going to become a File.object. You assume you get the error message when the method is defined. This is not true. The error is raised when the method is actually called (with a file object as a parameter). At this point ruby already knows that file is a File object (because that's what was passed into the method) - that's not the problem. The problem is that File objects don't have an eof method. It's eof? (with a question mark). HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826