Aah that's clever. I have one question though:
So if a condition is not met the first time a ternary statement is
called, and there's recurssion on the false side, would it ever go
through the true side again? (i.e. would it just keep going back to
the recursive point, which is the false side in this case?).
Linear regression has been done, so this kata is a duplicate.
wrong a/wrong b is terrible (and unacceptable) test feedback, so they should be changed. At least the expected and actual value should be shown, like in assert_equals.
I'd suggest requiring the solution to deal with a set of points such as this:
…and to add correspondint tests.
Also, needs more tests.
Sample tests uses Object but BasicObject is used in the actual tests.
They're completely different.
Test messages are very unhelpful.
Need random tests.
Wanting to have more tags is really no issue!
This comment is hidden because it contains spoiler information about the solution
Ah, the first time I have seen recursion used in Ruby! Thank you
this is reallllllly clever
I also translated this kata to python.
I think you can accept it, and then it will be shown with the kata.
The initial testcases will fail on sorting the list of threads / mutexes. Either put there the sort_by(&:object_id) thing (as in the submit testcases), or rather use to_set on both sides for comparison.