From: Robert Klemme Date: 2009-12-12T01:14:32+09:00 Subject: Re: Redirecting standard output 2009/12/11 Robert Gleeson : >>> persist. >> And exactly that is a problem: redirection does not take place for >> whoever owns foo => it failed. > > "whoever owns foo => it failed?" ..? I don't see any difference between > assigning $stdout and using $stdout.reopen in this case. > > foo = $stdout = File.open 'foo', 'w' > foo = $stdout.reopen 'foo', 'w' That is not a proper model of the situation. > They're both references to the same object. Can you elaborate or provide > an example? Thanks. Now I'm tired and leave that as exercise for the reader. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/