From: hemant Date: 2010-04-29T21:31:48+09:00 Subject: Re: Use of STDOUT.flush after puts On Thu, Apr 29, 2010 at 1:28 PM, Robert Dober wrote: > On Thu, Apr 29, 2010 at 9:16 AM, Siep Korteling wrote: > >> Instead of STDOUT.flush-ing multiple times, you can set STDOUT.sync = >> true once. > > And, please, instead of using STDOUT, please use $stdout, this allows > your users to mock stdout to somewhere else *without* getting constant > redefinition warnings. One can always use IO#reopen if one wants to redirect the output somewhere. I still prefer constant declaration more than global variable. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org