With commit 167a0edf the behaviour of Set.WHICH has changed in a
manner relevant  to this ticket.  The .WHICHes of the elements are no
longer concatenated with space separators, so spaces no longer confuse
Set.WHICH as they used to.  The element .WHICHes are now concatenated
with '\0' separators, so that's the new confusing string.  (The use of
the two-character string '\0' (backslash, zero) is probably a mistake
that was meant to be the one-character string "\0" (nul), but "\0" would
serve equally well to confuse Set.WHICH.)  The concatenated string is
also hashed, obscuring what's going on.

So, updated demo of Set.WHICH getting confused:

> Set.new("a", "b").WHICH
Set|E223E33FFE3B07DC78B48AFABA0EF4041F3BA975
> Set.new("a\\0Str|b").WHICH
Set|E223E33FFE3B07DC78B48AFABA0EF4041F3BA975
> Set.new("a", "b").WHICH === Set.new("a\\0Str|b").WHICH
True

The way in which Set.WHICH could be confused by innocently-constructed
elements that are Sets no longer occurs, because of the hashing.

-zefram

Reply via email to