Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There are already fixed tests with negative numbers, your solution will also return
false
(which is correct) forn = -5
/n = -6
because whenx = 2
,-6 != 2 * 3
for both cases above.Re-raised issue with details about the problem.
Marking issue as fixed.
The tests being random sometimes you pass, sometimes you don't... When you don't pass it is because you go a step too far: once the number you get has 2 digits you should stop. The description says: "you can stop when this number has at most 2 digits because you are supposed to know if a number of at most 2 digits is divisible by 7 or not". Example:
1119559
Expected: [91, 4], instead got: [7, 5]; you should have stop with[91, 4]
. I hope I'm clear enough... Anyway thanks for your post.67 guys passed the Ruby kata; yes all tests are OK.
I cannot reproduce the error, as it correctly returns
false
in my test code. I would assume that you modified somehow the array in place, which is bad practice.Btw, deployed a fix to prevent also this kind of occurrences.
@GiacomoSorbi, can you please have a look over the Ruby translation tests?