$stdout vs. $defout what's the difference?

In irb:

irb(main):001:0> class O; def write; end; end
=> nil
irb(main):002:0> old = $defout; $defout = O.new; $defout = old
=> #IO:0x2780498
irb(main):003:0> old = $stdout; $stdout = O.new; $stdout = old

At this point irb freezes and no further output is sent to the screen. Why?

···


John Long
http://wiseheartdesign.com

Hi,

What version of Ruby are you using? $defout is obslete since 1.8.

						matz.

matz@ruby-lang.org (Yukihiro Matsumoto) wrote in message news:1075105669.891034.1141.nullmailer@picachu.netlab.jp

Hi,

What version of Ruby are you using? $defout is obslete since 1.8.

  					matz.

Ruby 1.6.8

···


John Long
http://wiseheartdesign.com