From: Paul Brannan Date: 2002-09-25T22:49:51+09:00 Subject: Re: ruby and mktemp/mkstemp On Wed, Sep 25, 2002 at 07:42:10AM +0900, Gavin Sinclair wrote: > See the Tempfile class in Pickaxe. > > Gavin Hahaha, I've even used that class before and I had forgotten all about it. :) Looking at the source, it appears to do the right thing (though I'm no expert). The only thing that looks strange is the creation of the lock directory; it seems to me that the function could just try to open() the file to begin with; if the open() call fails, then the file probably already existed. I wonder if Ruby has been ported to a system on which O_EXCL is broken? It would also be nice if Tempfile.open took a block. Paul