lib/julbosch_palindrome.rb in julbosch_palindrome-0.2.0 vs lib/julbosch_palindrome.rb in julbosch_palindrome-0.2.1
- old
+ new
@@ -2,10 +2,14 @@
module JulboschPalindrome
# Returns true for a palindrome, false otherwise.
def palindrome?
- return processed_content == processed_content.reverse
+ if processed_content == ""
+ return false
+ else
+ return processed_content == processed_content.reverse
+ end
end
private
# Returns content for palindrome testing.
\ No newline at end of file