2010/6/30 Brian Candler <b.candler / pobox.com>:
> Robert Klemme wrote:
>> At least one can use Tempfile for this, e.g.
>>
>> Tempfile "prefix", "/tmp" do |io|
>> =A0 io.write everything
>>
>> =A0 io.seek 0
>> =A0 whatever_load_routine io
>> end
>
> or rather:
>
> Tempfile.open "prefix", "/tmp" do |io|
> =A0io.write everything
> =A0io.flush

I'd rather io.close instead of io.flush to release resources as soon
as possible.

> =A0whatever_load_routine io.path
> end

Ooops!  Yes, of course.  I copied the wrong example.  Sorry for my confusio=
n.

Cheers

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/