From: Brian Candler Date: 2009-06-08T21:39:55+09:00 Subject: Re: STDIN, OUT, ERR and $stdin, out, err - Differences? 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 That makes no sense. The OP said that $stdout.fileno != STDOUT.fileno, and yet $stdout.object_id == STDOUT.object_id It can't be the same object, but respond to the same method differently. What do you get from this? Run it as a standalone ruby script, not within irb, to eliminate irb as the source of the problem. puts STDOUT.fileno puts $stdout.fileno puts STDOUT.inspect puts $stdout.inspect # and repeat for STDERR/$stderr -- Posted via http://www.ruby-forum.com/.