Ad
  • Custom User Avatar

    Thank you very much, that comment of yours was game changing.

  • Custom User Avatar

    Oh! Okay, thank you!

  • Custom User Avatar

    Ah, ok thanks! Date class was new for me :)

  • Custom User Avatar

    OK! Don't forget to upvote a post when it helps you:-)

  • Custom User Avatar

    You are editing the variables. So when you get the variable yCTuZX, you are taking the middle two (TU) and removing them from the variable. Then when I get the variable to test, it just sends my code yCZX because you have removed letters from it. Try duplicating the variable to a different veriable, or go with the better solution of using a method that doesn't affect the variables. If you keep changing variables that are sent to you, you are going to run into this issue a lot. So it is best to avoid doing that on Codewars. (I would speak for general coding practices, but I am not a ruby dev and I don't know if it is standard to edit incoming parameters.)

  • Custom User Avatar

    Oh, thanks!
    I wasn't aware of the duplicated strings in the result of rotation.

  • Custom User Avatar

    Try to find all rotations of strng = "12341234" and you will see...

  • Custom User Avatar

    Yea, but the input was only a '#' character, how sould I count with that?

  • Custom User Avatar

    Ruby: It seems the last test case is wrong..

    Expected: true, instead got: false
    strng = "12341234",
    arr = ["DIeF", "IeFD", "12341234", "41234123", "34123412", "23412341"]

    How can this be true? arr doesn't seems to contain all the rotations

  • Custom User Avatar

    Ruby: day contains only a # ... :(
    Pls fix it.

    def days_until_christmas(day)
    day
    end

    Basic tests
    Expected: 16, instead got: #
    Expected: 17, instead got: #
    Expected: 18, instead got: #
    Expected: 305, instead got: #
    Expected: 167, instead got: #
    Expected: 16, instead got: #
    Expected: 282, instead got: #
    Expected: 0, instead got: #
    Expected: 364, instead got: #
    Expected: 365, instead got: #

  • Custom User Avatar

    Smtg wrong with Ruby Random test...

    Random tests
    Testing for diFpFlyWfzXcEHNCIlz
    It should work for random inputs too - Expected: "fX", instead got: "z"
    Testing for sPSUvuIIrCZlcrYHino
    It should work for random inputs too - Expected: "rZ", instead got: "C"
    Testing for yCTuZX
    It should work for random inputs too - Expected: "CZ", instead got: "Tu"