From: Martin DeMello Date: 2009-12-21T17:26:56+09:00 Subject: redirecting stderr in irb Redirecting $stderr in irb doesn't work but redirecting $DEFAULT_OUTPUT does. Can anyone explain why this happens? Also, is there any clever way to run irb in a thread and then redirect $DEFAULT_OUTPUT only for that thread? $ irb irb(main):001:0> require 'stringio' => true irb(main):002:0> $stderr = StringIO.new => # irb(main):003:0> hello NameError: undefined local variable or method `hello' for main:Object        from (irb):3        from /usr/bin/irb:12:in `
' irb(main):004:0> $> = StringIO.new irb(main):005:0> hello irb(main):006:0> (Sorry if you're seeing this twice, didn't get any response in ruby-core so I'm forwarding to ruby-talk) martin