From: J J Date: 2001-05-25T00:41:25+09:00 Subject: [ruby-talk:15672] Re: Disabling stderr That takes care of the error about assigning to a constant (oops), but still prints the exception to the console. Regards, JJ -- Be Kind, Be Careful, Be Yourself -- Solid, reliable software at reasonable prices http://www.johnjohnsonsoftware.com "Jim Menard" wrote in message news:wsqzoc3j63j.fsf@eris.io.com... > "J J" 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 >