Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2012 19:34
Show Gist options
  • Save anonymous/1967725 to your computer and use it in GitHub Desktop.
Save anonymous/1967725 to your computer and use it in GitHub Desktop.
def palindrome?(string)
string.downcase!.gsub!(/\W/, '').reverse == string
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment