Skip to content

Instantly share code, notes, and snippets.

@MichaelWhi
Created October 18, 2012 18:20
Show Gist options
  • Save MichaelWhi/3913904 to your computer and use it in GitHub Desktop.
Save MichaelWhi/3913904 to your computer and use it in GitHub Desktop.
class String
def palindrome?
self.downcase.gsub(" ", "").reverse == self.downcase.gsub(" ", "")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment