Unlinks the file. On UNIX-like systems, it is often a good idea to unlink a temporary file immediately after creating and opening it, because it leaves other programs zero chance to access the file.
# File lib/tempfile.rb, line 136 def unlink # keep this order for thread safeness begin if File.exist?(@tmpname) closed? or close File.unlink(@tmpname) end @@cleanlist.delete(@tmpname) @data = @tmpname = nil ObjectSpace.undefine_finalizer(self) rescue Errno::EACCES # may not be able to unlink on Windows; just ignore end end