From: Mark Slagell Date: 2001-09-22T21:37:47+09:00 Subject: [ruby-talk:21528] Restoring $stdout in Windows A Unix/Windows behavior difference: puts 1 dbg = File.new "debug.txt","w" $stdout = dbg puts 2 $stdout = STDOUT dbg.close puts 3 Desired output is "1\n3\n", with "2\n" going to debug.txt. In Windows, output is "1\n", with "2\n3\n" going to debug.txt. I notice that it works in Windows if $defout is substituted for $stdout. ... but guess I don't quite understand the distinction. --Mark