From: Robert Klemme Date: 2010-07-01T00:09:10+09:00 Subject: Re: Reading String Data as a File 2010/6/30 Brian Candler : > Robert Klemme wrote: >> At least one can use Tempfile for this, e.g. >> >> Tempfile "prefix", "/tmp" do |io| >>   io.write everything >> >>   io.seek 0 >>   whatever_load_routine io >> end > > or rather: > > Tempfile.open "prefix", "/tmp" do |io| >  io.write everything >  io.flush I'd rather io.close instead of io.flush to release resources as soon as possible. >  whatever_load_routine io.path > end Ooops! Yes, of course. I copied the wrong example. Sorry for my confusion. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/