On Sep 6, 2007, at 11:34 AM, Gregory Brown wrote:

> On 9/6/07, optman <optman / gmail.com> wrote:
>> Where is the public class method File.read() defined? Which take a
>> file name as parameter, but what is in return? I have search all the
>> document and source code, just can't find the definition.
>>
>> Could anyone point me to the source file? I really want to know,
>> thanks in advance.
>
> It actually inherits IO.read, IIRC
>
> Source:
> http://www.ruby-doc.org/core/classes/IO.src/M002270.html
>
Ruby methods normally return the last thing in the method.
File.read() will return the contents of the file.

As others said, it inherits from class IO
Many people just use IO.read() instead because of this.
you can go into the site ruby directory inside of the ruby directory  
(where you installed ruby) and open the File class files and read them.