Per the docs:

"If a block is given, it is yielded with the path of the directory.
The directory and its contents are removed using
FileUtils.remove_entry_secure before ::mktmpdir returns. The value of
the block is returned."

"If a block is not given, The path of the directory is returned. In
this case, ::mktmpdir doesn¡Çt remove the directory."

http://ruby-doc.org/stdlib-1.9.3/libdoc/tmpdir/rdoc/Dir.html#method-c-mktmpdir

-- Matma Rex