Skip to content

Instantly share code, notes, and snippets.

@efoxepstein
Created February 12, 2012 20:17
Show Gist options
  • Save efoxepstein/b83351ff0e349f49e5a8 to your computer and use it in GitHub Desktop.
Save efoxepstein/b83351ff0e349f49e5a8 to your computer and use it in GitHub Desktop.
require 'readline'
t = Thread.start { loop { puts "Tick" ; sleep 1 } }
while line = Readline.readline('- ', true)
puts "<< You typed #{line}"
sleep 0.01
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment