I'm not sure why this recursive method is returning NoMethodError: undefined method '[]' for nil:NilClass
def test_method(a, b)
(a[0] == b[0] ? 0 : 1) + test_method(a[1..-1], b[1..-1])
end
edit: I am sending in strings for the arguments to compare them.