Advertisement
Guest User

Untitled

a guest
Oct 8th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def palindrome(str)
  2. strings_1 = str.gsub(/\W/, "").downcase
  3. strings_2 == strings_1.reverse
  4. # if strings_1 == strings_2
  5. # puts "True"
  6. # else
  7. # puts "False"
  8. # end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement