mirror of
https://github.com/ruby/ruby.git
synced 2026-01-29 21:44:28 +00:00
As @jeremyevans pointed out for commit eb2d8b1: > Each Tempfile instance has a separate File instance and file descriptor: > > t = Tempfile.new > t.to_i # => 6 > t.dup.to_i => 7 FinalizerManager will keep track of the open File objects for the particular file and will only unlink the file when all of the File objects have been closed. https://github.com/ruby/tempfile/commit/753ab16642