I'm running a long process and need to give some feedback to the user
(command line program).  Is there some way to force output at a given
step of execution?  Many times it seems that the output is spooled and
then printed to the screen all at once.

e.g.:

# ... inside some_very_long_program
puts "working..."   # needs to display here and not spool it until
later

Thanks