From: Brian Candler Date: 2003-02-27T23:03:43+09:00 Subject: Re: Redirecting/Logging output On Thu, Feb 27, 2003 at 10:13:01PM +0900, nobu.nokada@softhome.net wrote: > class << (log = File.new('log.txt','w')) > def write(s) > STDOUT.write(s) > super > end > def putc(s) > STDOUT.putc(s) > super > end > end > $defout = log Under 1.6.8, overriding of 'putc' does not work properly. Example: print "Hello" putc 32 printf "world%s\n", "!" prints "Helloworld!\n" to STDOUT, but puts the correct answer in the log file. But it works if you change it to: $defout.putc 32 Any idea what is going on? Regards, Brian.