Created
May 8, 2009 17:55
-
-
Save benatkin/108903 to your computer and use it in GitHub Desktop.
This file contains 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
# Prompts for a password five times, and starting with the second password, | |
# prints whether the each password matches the first password given. | |
require 'highline' | |
firstpass = nil | |
5.times do | |
pass = HighLine.new.ask('enter password: ') { |q| q.echo = false } | |
puts firstpass == pass if firstpass | |
firstpass ||= pass | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment