# $Id: flushoutput.rb,v 1.1 2005/04/04 21:50:01 nicoza Exp $ # These functions are overloaded versions of the normal stdout # functions which you find in the global namespace. They are a # necessary evil seeing as cygwin/rxvt expects all output to # be flushed manually. Has something to do with pty's or whatever # I don't really care, just want it to work, so here goes: # we want to see if 'flush' has been passed as an argument # to the server. there must be a better way then looping # through the damn array? if ARGV.include?('flush') def puts(str,*args) $stdout.puts(str,*args) $stdout.flush end def print(str, *args) $stdout.print(str, *args) $stdout.flush end end