lib/juandpineiro_palindrome.rb in juandpineiro_palindrome-0.2.0 vs lib/juandpineiro_palindrome.rb in juandpineiro_palindrome-0.2.1
- old
+ new
@@ -12,9 +12,10 @@
private
# Returns content for palindrome testing.
def processed_content
+ # Ignores anything that is not a letter or number
to_s.scan(/[a-z\d]/i).join.downcase
end
end
class String