From: Martin DeMello Date: 2009-12-20T06:41:40+09:00 Subject: [ruby-core:27237] Re: irb's output_method Okay, looks like that doesn't work for errors. Also, redirecting $stderr doesn't work but redirecting $DEFAULT_OUTPUT does. Can anyone explain why this happens? $ 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> martin