From: Daniel Berger Date: 2007-10-10T03:47:15+09:00 Subject: Re: Ruby binary temp file On Oct 9, 12:00 pm, wi...@yahoo.com wrote: > require 'tempfile' > f = Tempfile.open 'tmp' > > will open f in text mode (mode = 'w', not 'wb'). Any non-hacky way to > open this in binary mode? I can, of course, make f, close it and open > it as a real file - it's just this is not atomic. Not that I can see. May I suggest file-temp? It opens in binary mode by default: http://raa.ruby-lang.org/project/file-temp Regards, Dan