On Tue, 10 Feb 2004 20:35:59 +0900, Tietew wrote:
> On Tue, 10 Feb 2004 20:20:03 +0900
> In article <pan.2004.02.10.11.14.38.972811 / adslhome.dk>
> [capture stderr]
> Simon Strandgaard <neoneye / adslhome.dk> wrote:
> 
>> I want to temporarily capture stderr output.
> 
> No need to reopen. Just assign StringIO.
> 
> 
> require 'stringio'
> 
> e = StringIO.new
> $stderr = e
> warn "hello"
> $stderr = STDERR
> 
> p e.string  # => "hello\n"
> 

Nice.. this indeed does the same job.  Thanks.

--
Simon Strandgaard