Ad
  • Default User Avatar

    That's disappointing indeed. The fitness Proc expects an integer rather than a binary string. Call it with fitness.call(c.to_i(2)).

  • Custom User Avatar

    I'm having the same problem for the Ruby version. Cannot get any helpful info from the error messages and there are not Sample Tests either.

    Edit: managed to solve it in the end.

    The problem was that all error messages are supressed or whatever, so even though my code had errors unrelated to the output, they were not displayed properly.

    Instead I got messages of the type Expected: "binary string", instead got: "Not a integer" even though the error could be something completely different, such as an undeclared variable.

    This made the debugging very difficult so it took me a while to even understand that the fitness method returns a rational...

  • Custom User Avatar
  • Custom User Avatar

    confirmed (note: ruby)

  • Custom User Avatar

    I'm having the same problem. I feel like this kata isn't very specific in many ways, and it's driving me nuts.
    Did you ever get a solution? Even when I edit my run functions return with to_i (for ruby), it still gives me
    exactly the same thing. It's really frustrating since I'm not sure what the attempt test is even doing.

  • Custom User Avatar

    If you want to visit the towns...

  • Default User Avatar

    I agree, the lack of this test compromises the usefulness of the kata. Although I guess with over 1k completions you can't modify the tests anymore!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The "expected" is what you must get. In all languages the last test gives the same result and many guys passed it without problem.

  • Custom User Avatar

    The tests are not wrong and your post above seems to show that you have at last passed:-)