Hi ..

On Wed, 2005-07-27 at 08:32 +0900, Guillaume Marcais wrote:
> On Wed, 2005-07-27 at 08:15 +0900, Mark Probert wrote:
> > 
> > Any ideas on how to redirect stdout in an extension and then revert it
> > back to its default behaviour?  freopen() redirects, though I am not
> > sure of returning to normal programming.
> > 
>
> Just a guess. I don't know how well it will play with the Ruby
> interpreter. 
>
Not so well, unfortunately:

  $ ruby foo.rb
  test.rb:29:in `write': Bad file descriptor (Errno::EBADF)
        from test.rb:29:in `puts'
        from test.rb:29

Thanks for the suggestion.  I would think that there might be some
facility hidden with the API that might allow this redirection to
happen, but I have no idea of what it might be ..

Regards,

-- 
-mark.  (probertm at acm dot org)