What happens when you run this code? ``` require 'pathname' require 'tempfile' def make_pathname(value = http://Tempfile.new ("log")) http://Pathname.new (value) end p = make_pathname FileUtils.touch(p) puts "File: #{p.file?}" GC.start puts "File: #{p.file?}" ```
Finalizers are such an anti-feature IMO. Destructors like this really only work if they're deterministic in when they're run
-
-
Generally, the days of mine that involve the use of the word "finalizer" and "ruby" are not good days.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.