Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created August 20, 2009 22:34
Show Gist options
  • Save thinkerbot/171473 to your computer and use it in GitHub Desktop.
Save thinkerbot/171473 to your computer and use it in GitHub Desktop.
A Readline example
require 'readline'
Signal.trap('INT', 'SIG_IGN') { puts "hello" }
while line = Readline.readline('--/', true)
exit if line == "exit"
puts line
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment