From: Luis Lavena Date: 2009-06-07T09:15:08+09:00 Subject: Re: STDIN, OUT, ERR and $stdin, out, err - Differences? On Jun 5, 10:14 pm, Terry Cooper wrote: > Can anyone explain what's happening here? > > print $stdin.fileno  => 0 > print $stdout.fileno => 0 > print $sterr.fileno  => 0 > > print STDIN.fileno  => 0 > print STDOUT.fileno => 1 > print STDERR.fileno => 2 > > print STDOUT.object_id     => 21673330 > print $stdout.object_id    => 21673330 > > I get the same results in and out of eclipse and with irb > > ruby 1.8.6, XP > > Many thanks. Differences between $stdout and STDOUT: http://blog.segment7.net/articles/2006/08/17/stdout-vs-stdout The bottom line is don't mess with STDOUT and use $stdout instead. Regards, -- Luis Lavena