End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Tempfile#close
close(unlink_now=false)
lib/tempfile.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/tempfile.rb, line 168
def close(unlink_now=false)
_close
unlink if unlink_now
end
Closes the file. If unlink_now is true, then the file will be unlinked (deleted) after closing. Of course, you can choose to later call unlink if you do not unlink it now.
If you don’t explicitly unlink the temporary file, the removal will be delayed until the object is finalized.