From: Hongli Lai Date: 2009-08-21T18:45:42+09:00 Subject: [ruby-core:25022] Re: [Bug #1494] tempfile#unlink may silently fail on windows Hongli Lai wrote: > Tanaka Akira wrote: > Good idea, I can add that too. > > For now, what do you think about the current changes? On second thought, I'm not sure whether a block syntax would be very useful in practice. All of the existing code that I've encountered that uses the unlink-before-close trick do not fit comfortably in a block syntax. For example Rack::RewindableInput: http://github.com/rack/rack/blob/38f205e975d3e540cc81a71a639f4bebc3c2a293/lib/rack/rewindable_input.rb The tempfile isn't supposed to be closed until RewindableInput#close is called. Regards, Hongli Lai