From: Gilles Filippini Date: 2002-07-09T05:24:49+09:00 Subject: Re: Redirecting standard error Massimiliano Mirra wrote: > > On Mon, Jul 08, 2002 at 10:04:04PM +0900, Gilles Filippini wrote: > > I saw many examples about how to redirect standard output to - say - a > > string buffer. > > What about standard error? Has anybody already done this? > > I wrote and currently use a StringIO. You can do something like this: [snip] > If you want to have a look at it, I'll put it online at > http://www.allruby.com/rpkg/stringio.rb by tonight. > Thanks a lot. I'll have a look at it. I talked about a string buffer, but actually I'd like to redirect stderr to something else. Thus what I need is something like a CustomIO that can be subclassed to a StringIO or something else, with just a few methods to rewrite. _gilles.