Dirk Einecke wrote:
> Hi.
> 
> Andreas Schwarz wrote:
> 
>> Dirk Einecke wrote:
>>
>>> Is there a shorter way to get the content of a file?
>>
>>
>> File.read(filename)
> 
> 
> That's not working and I can not find read() here: 
> http://www.rubycentral.com/ref/ref_c_file.html
> 
> I'm using Ruby 1.6.7

What I did in Ruby < 1.8 is the following:

   File.readlines(filename).to_s

or instead of to_s, join("")

Regards,

   Michael