"J J" <jj5412 / earthlink.net> writes:

> 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.

Untested answer: try assigning to $stderr and $stdout (global variables)
instead of STERR and STDOUT (constants containing the default values of
$stderr and $stdout).

Jim
-- 
Jim Menard, jimm / io.com, http://www.io.com/~jimm/
"Even anarchists have an agenda." -- Keith Beal