Conversation
There was a problem hiding this comment.
I'm not sure I understand the logic here at all, at a minimum it needs an explanatory comment.
There was a problem hiding this comment.
Ok, now I understand it, using throw/catch seems way too complex, why not just use the normal recursion_guard and if the object is in a recursion return 0 or something.
There was a problem hiding this comment.
That catches the recursion on the inside rather than the outside, and we've already modified the hash for the intervening layers. We get a.hash == [[a]].hash because of the XOR, but a.hash != [a].hash.
|
Turns out we need finer-grained recursion guarding before we can do this thing safely. |
|
I'll update this to a simpler version that uses |
Three of the specs are still tagged. Two of these need
Array#fillwhich isn't yet implemented and the third probably needs fixes toHash#hash.