From: Janus Bor Date: 2008-07-16T06:26:21+09:00 Subject: Re: Immediately print a string on stdout without new line? 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/.