From: Damjan Rems Date: 2007-06-19T18:11:13+09:00 Subject: When file gets closed in a block I like to use this a lot: File.new(cName,'wb+').write('aText') I have understood that file gets automaticly closed. But when? You can not delete file right after above statement. If you want to delete file you must use this. f = File.new(cName,'wb+') f.write(attachment.unpack('m')) f.close When does the file in block gets closed. by TheR -- Posted via http://www.ruby-forum.com/.