From: Michael Steinfeld Date: 2008-03-04T02:32:23+09:00 Subject: Re: Loading a file in a buffer... On Mon, 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: # > try: File.open("/home/my_file", "r") do |infile| while (line = infile.gets) puts "#{counter}: #{line}" counter = counter + 1 end end > > If you know a way to do so, please help me :) > Thanks. > > Zang' > -- > Posted via http://www.ruby-forum.com/. > >