Ad
  • Custom User Avatar

    If the parameter is omitted, the default value should be an empty string. Your code is returning nil because the parameter doesn't exist and you are using str even though it doesn't exist.

  • Default User Avatar

    It's a suggestion not an issue.

  • Custom User Avatar

    Current Ruby translations has 8 example test cases, which is not that few for a kata.

  • Custom User Avatar

    Try to puts the original input and see some example; I fear your code might have some counting problem; on a side note, you would only need to use .to_f once, if you want a small bit of extra optimization.

  • Custom User Avatar

    I think you've made just a little mistake and there's a bug in ruby's example test cases. Just rename the method in this example test case or only use the final tests.