Ad
  • Custom User Avatar

    Happy to be told that I am wrong, but this did not work for me:

    n.to_s.split("").inject(0) { |res, num| res += num.to_i }

    I think jriches is right, there might be a problem with the tests.