From: Brian Candler Date: 2009-06-08T21:50:25+09:00 Subject: Re: STDIN, OUT, ERR and $stdin, out, err - Differences? Brian Candler wrote: > Janos Sebok wrote: >> On Sun, Jun 7, 2009 at 7:34 PM, Brian Candler >> wrote: >> >>> >>> Copy-paste error? The third line is clearly a typo for $stderr, and >>> under Linux at least these give 0, 1, 2 respectively. >> >> I can confirm this is true on WinXP, Ruby 1.8.7 and 1.9.1 Maybe I misunderstood, and you were confirming my interpretation to be true, not the OP's :-) Anyway I've just booted a laptop into XP, and done this: C:\>ruby puts STDOUT.fileno puts $stdout.fileno puts STDOUT.inspect puts $stdout.inspect puts STDERR.fileno puts $stderr.fileno puts STDERR.inspect puts $stderr.inspect ^Z 1 1 # # 2 2 # # C:\>ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] This version of Ruby came from the 'one-click installer' Ruby-186-26 And FWIW, I get the same in irb too. HTH, Brian. -- Posted via http://www.ruby-forum.com/.