From: Morton Goldberg Date: 2008-03-04T02:37:46+09:00 Subject: Re: Loading a file in a buffer... On Mar 3, 2008, at 12:20 PM, Zangief Ief wrote: > Hello everybody, > > I would like to load the exact content of a file in a buffer (with the > same carriage return). To do so, I had trying this: > > file = File.open('/home/my_file') > > To verify if that work normally, I had try to add this for display the > content of my_file: > > puts file > > But my_file was not been printed, and I got: # > > > If you know a way to do so, please help me :) Try buffer = IO.read('/home/my_file') or buffer = File.read('/home/my_file') They both do the same thing because File inherits 'read' from IO. Regards, Morton