From: Sammy Larbi Date: 2008-05-30T01:49:07+09:00 Subject: File.open auto-close ------=_Part_9811_12060501.1212079757155 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I know opening a file and passing a block will execute the block in context of the file and then close the file. Example: File.open("somefile.txt") {|f| the_text = f.read } After running, somefile.txt will be closed. I'm wondering if it's ok to read a file like this: the_text = File.open("somefile.txt").read Will that close automatically? If not, how would I go about closing it? Thanks, Sam ------=_Part_9811_12060501.1212079757155--