It shouldn't get removed until the process is ended or it is specifically removed with close and unlink.  Might be interpreting this wrong -- http://www.ruby-doc.org/stdlib-2.0/libdoc/tempfile/rdoc/Tempfile.html