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/.