From: Mathieu Bouchard Date: 2001-05-27T02:31:48+09:00 Subject: [ruby-talk:15768] Re: Disabling stderr > I've got a adequate fix that will work for me for now, but i'd really > like to see this behavior controllable thru the ruby api. What i've done is > wrap the call to 'rb_eval_string'... > freopen( "nul", "a", stderr ); [...] > > > nulFile = File.open('nul', 'w') # UNIX: nulFile = > > > File.open('/dev/null', 'w') > > > STDERR = nulFile Why don't you do STDERR.reopen "/dev/null","w" ? matju