Skip to content

Instantly share code, notes, and snippets.

/name

Created June 3, 2016 07:57
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 anonymous/ffffd5e7dcf67a71f365106f1d0dea44 to your computer and use it in GitHub Desktop.
Save anonymous/ffffd5e7dcf67a71f365106f1d0dea44 to your computer and use it in GitHub Desktop.
loop do
print "Enter name: "
name = gets.chomp
break if (name.to_s) !~ /[^a-z]/i
puts "Invalid name. Please try again."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment