From: Daniel Berger Date: 2006-03-23T06:11:24+09:00 Subject: Re: Best way to slurp a file into a string? Wes Gamble wrote: > Isn't it better to do the block thing so that the file gets closed, > etc.? Nope. No need to worry about that with IO.read. It's not returning an open handle, just a string. Regards, Dan > > 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 > > >