Created
July 23, 2008 20:29
-
-
Save ELLIOTTCABLE/1895 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[STDERR, STDOUT, STDIN].each {|io| io.sync = true if !io.sync } | |
while true | |
ready = select([STDIN]) | |
if ready.flatten.include? STDIN | |
foo = STDIN.gets | |
p foo | |
end | |
STDERR.puts '.' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment