How about:

nulFile = File.open('nul', 'w')      # UNIX: nulFile =
File.open('/dev/null', 'w')
STDERR = nulFile

etc.

Trouble is, exceptions don't seem to print to STDERR, or STDOUT.
E.g.

C:\john\ruby>ruby -e "q=File.open('nul','w'); STDERR=q; STDOUT=q; raise
'potty'"

-e:1: warning: already initialized constant STDERR
-e:1: warning: already initialized constant STDOUT
-e:1: potty (RuntimeError)

Regards,
  JJ

--
Be Kind, Be Careful, Be Yourself
--
Solid, reliable software at reasonable prices
http://www.johnjohnsonsoftware.com


"Tom Spilman" <tspilman / home.com> wrote in message
news:b41P6.14655$CD5.7050932 / news2.rdc2.tx.home.com...
>     Is there a way to keep Ruby from sending exception info to the stderr
> stream when i've embedded it into my application?  Thanks.  Tom
>
>