If no block is given, this is a synonym for new().
If a block is given, it will be passed tempfile as an argument, and the
tempfile will automatically be closed when the block terminates. In this
case, open() returns tempfile – in contrast to the original implementation,
# File lib/nuggets/tempfile/open.rb, line 41 def open(*args) tempfile = new(*args) if block_given? begin yield tempfile ensure tempfile.close end end tempfile end