From: Wes Gamble Date: 2006-03-23T06:10:04+09:00 Subject: Re: Best way to slurp a file into a string? I see that IO.read takes care of that. Sorry for the dumb question. I knew that this would be as easy (or easier) than in Perl!!! Wes Wes Gamble wrote: > Isn't it better to do the block thing so that the file gets closed, > etc.? > > Daniel Berger wrote: >> Wes Gamble wrote: >>> so that the html variable has all of the contents of f. >>> >>> Is there a better/easier way? >>> >>> Thanks, >>> Wes >>> >> >> IO.read(@document.path) >> >> Regards, >> >> Dan -- Posted via http://www.ruby-forum.com/.