• Custom User Avatar

    Ruby 2.5: main.rb:56: warning: constant ::Fixnum is deprecated.

  • Custom User Avatar

    It's not specified what should be returned for invalid input.
    It's not specified what kind of invalid input can be there. Strings in Ruby look really unnecessary and unrelated to the task.

  • Custom User Avatar

    Edge cases should always be tested.
    250 is specified as valid, but is considered invalid in JS.
    250 isn't tested in Ruby.

  • Custom User Avatar

    This is approvable without any Ruby completions. It would seem a good idea to have the Ruby translation tested a little before approving this.

    Please resolve this issue when the kata should be approvable again.

  • Custom User Avatar

    Ruby :

    • no random tests
    • answer seems wrong

    For the first candle, the SA from 98 * 196 is 75429 which is higher than a 123 x 123 candle (71293)?

  • Custom User Avatar

    There are no random tests.

    Also, this goes without saying, but once you start making random tests you'll realize that this kata is a bad idea (or free text parsing in general).

  • Custom User Avatar

    Math.savetheday();

    Thanks, again!

  • Custom User Avatar

    Test.randomNumber() will give you a random number between 0 and 100 (both inclusive). It doesn't matter if you give it an argument. If you want a random number between 37 and 250, you'll have to write your own generator.

  • Custom User Avatar

    Thank you!

  • Custom User Avatar

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

  • Custom User Avatar

    True! Thanks!
    I Added tests and fixed up the source code to handle n>=250 or n<=0.

  • Custom User Avatar

    It seems "bad inputs" (n>=250 or n<=0) are not tested in final tets.

    ; ) )

  • Custom User Avatar

    Test.expect does not work that way.

    Usage:

    var condition = /* the test will test if its value is truthy */
    
    Test.expect(condition, "description that is shown if condition is not true")
    
  • Custom User Avatar

    Hope I did this properly.
    Just copied the function into the test suite and called the test against it for 25 random tests.

    Thank you for your input!

  • Custom User Avatar

    fixed: checked for two more nuls slipping through.

  • Loading more items...