From: Glen Holcomb Date: 2008-07-16T06:31:43+09:00 Subject: Re: Immediately print a string on stdout without new line? ------=_Part_11678_25425377.1216157785297 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Jul 15, 2008 at 3:26 PM, Janus Bor wrote: > fedzor wrote: > > Try this: > > > > print "Processing... " > > STDOUT.flush > > > > sleep 3 > > > > puts "done" > > > > STDOUT#flush will ensure that everything in the buffer will be > > printed, there and then > > > > Thank you! That does the trick... > > > Glen Holcomb wrote: > > Janus this works for me: > > > > def processing > > print "Processing... " > > sleep(3) > > print "done!" > > end > > > > processing > > > > Strange, on my machine (Ruby 1.86 on Linux) "Processing... " and "done!" > appear at the same time (after the 3 seconds). > -- > Posted via http://www.ruby-forum.com/. > > Until reading fedzor's post I had completely forgotten that different Operating systems behave differently. I'm on a Windows machine here at work. Glad you got it fixed though. -- "Hey brother Christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------=_Part_11678_25425377.1216157785297--