Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Without seeing the code we have no clue either.

  • Custom User Avatar

    I have two pieces of code on my machine (one iterative and one recursive), both of which work perfectly well in all cases. However, weirdly, the recursive one fails on the test provided here, even though the arrays for which it fails actually work just fine on my computer. No clue what the issue can be.

  • Custom User Avatar

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

  • Custom User Avatar

    You are right that arguments are strings, but the way how you use downcase is not fully correct. How will your solution work for string "aA"? What will word.count(l) return for each character?

    The Issue tag is meant to be used when you find a bug or some other problem in a kata, and something needs to be fixed. In this case, your problems are caused by a bug in your solution. There is nothing to fix in the kata.

  • Custom User Avatar

    Okay, i removed the "issue" flag and, though my biggest issue was that it produced errors referencing lines and code that had nothing to do with what I provided, i'll avoid the issues button. I'm new to this site so please let me know at what point it is advisable to touch the "issue" button.

    Edit: also I'm not sure how to make sense of your comment. "".downcase is valid Ruby to run on a string and passes the initial test. Unless I am drastically mistaken here, I assumed that the arguments used in both the initial test and the tests used on submisssion would be strings.

  • Custom User Avatar

    i added better assertion messages to Ruby. your code is wrong, downcase is not a mutating method, so think about how it affects the logic of your code. please do not raise issues so lightly in the future, ask a question instead to ask for help

  • Custom User Avatar

    Is this code bugged in Ruby? Running "test" only runs one test (which it passed). I had to manually check every listed test, which all match. But when I try to submit, it fails...something...

  • Custom User Avatar

    Thank you a lot, I was not aware of that!

  • Custom User Avatar

    When you hit "test", your solution is only run against the sample tests that you can see at the bottom of the code editor. When you hit "attempt", your solution is run against a much larger set of tests that aren't visibile to you. You can always print the input to the console to see what the inputs are though.

  • Custom User Avatar

    heyy why does it work when i try but doesn't when I attempt?

    Failed asserting that null is identical to -3523.

    and when I try it passes all the tests???

  • Custom User Avatar
  • Custom User Avatar

    Approved

  • Custom User Avatar

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

  • Custom User Avatar
  • Loading more items...