为什么此代码为此输入提供错误的输出?
def palindrome?(str)
str.delete('^a-zA-Z')
str.downcase
str == str.reverse
end
INPUT = "A man, a plan, a canal -- Panama"
OUTPUT = Failure/Error: palindrome?("A man, a plan, a canal -- Panama").should be_true, "Incorrect results for input: \"A man, a plan, a canal -- Panama\""
Incorrect results for input: "A man, a plan, a canal -- Panama"
# spec.rb:7:in `block (2 levels) in <top (required)>'
# ./lib/rspec_runner.rb:36:in `block in run_rspec'
# ./lib/rspec_runner.rb:32:in `run_rspec'
# ./lib/rspec_runner.rb:23:in `run'
# lib/graders/weighted_rspec_grader.rb:6:in `grade!'
# ./grade:31:in `<main>'