Ad
  • Custom User Avatar

    As long as the given input is not a string or any characters within it are not digits, you should raise an Exception. Currently, you are only checking whether the string is a single-spaced character and any of the characters in it is NaN, which is not feasible because strings can only store characters.

  • Custom User Avatar

    You should raise an Exception rather than exit().

  • Custom User Avatar

    You should raise an Exception instead of returning false for invalid inputs.

  • Custom User Avatar
    • No random tests in Ruby

    • Ruby 3.0 should be enabled

  • Custom User Avatar

    The overall idea is quite interesting and unique.
    I have to admit, though, that the requirement of an exception as a possible output
    seems to me unjust and unnecessary, especially in context of a FP oriented language.

  • Default User Avatar

    Oops. Sorry.

  • Custom User Avatar

    kata hint != kata suggestion

  • Custom User Avatar

    Approved

  • Custom User Avatar

    that is one way to handle issues

    But there is no issue presented. Issues like "tests are broken" or "it works on my PC" are simply useless, because you're giving no tangible information to track or fix.

    At least you mentioned the language, which is a start, but what next? Should I (or anyone else) go and debug the entire tests suite, trying to find a bug that probably doesn't exist? Keep in mind, I don't even know what I'm looking for, because there is no mention of a test that causes the failure, an error message that could help narrow it down, or... anything?

    There are a few issues already raised below, so you should check them first to see if it's already reported, or provide as much information as possible. The kata is 10 years old (originally published in Ruby), so I expect there to be some issues like poor feedback or lack of tests... but that has to be specified in issue report.

  • Default User Avatar

    It's not enough to just say something is broken; very often it is in fact the user's code, not the tests.

    So, the appropriate way to handle issues is to provide details, explaination, examples, or evidence of the problem, as can be seen in the post just before this thread.

  • Custom User Avatar

    No proof, no issue.

  • Custom User Avatar

    Proof?

  • Custom User Avatar

    Ruby Tests are broken.

  • Default User Avatar

    There should be more random tests for odd number of digits to avoid solutions like this.

  • Custom User Avatar

    I really remember this fun tradission from my childhood.
    But author did not tell the the most interesting part of the belief:
    when you have such ticket you should eat that ticket for luck to work !!! )))

  • Loading more items...