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