ruby / set

This library provides the Set class, which deals with a collection of unordered values with no duplicates.
BSD 2-Clause "Simplified" License
23 stars 13 forks source link

Add `Set#join` #4

Closed marcandre closed 3 years ago

marcandre commented 3 years ago

[Fix #16991]

This PR simply defers the work to Array; I don't particularly care what happens to elements of sets that would be arrays or sets themselves (i.e. if join is recursive on them or not).

knu commented 3 years ago

join may sound a bit like a math term (something like union), but hopefully it's not in the set theory and it's okay.

marcandre commented 3 years ago

@knu can we merge this please?

knu commented 3 years ago

I don't have a strong opinion on this. Could this be escalated into proposing Enumerable#join by any chance?

marcandre commented 3 years ago

I put a reminder in my request that Enumerable#join is problematic in general, in particular Struct, but shouldn't be for sets.

marcandre commented 3 years ago

So what's the final verdict?