Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created July 23, 2008 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ELLIOTTCABLE/1895 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/1895 to your computer and use it in GitHub Desktop.
[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