doc currently indicates the return value as `new_array` but then in the first sentence explains "always returns +self+ (never a new array)".Ethan (Ethan -)
It seems like a regression to me. I mean, it broke my code - maybe I'm alone, I can't say whether other people override #initialize and expect Set[] to call it, but it seems like a reasonable assumption to make, particularly since it alw...Ethan (Ethan -)
I am not certain what behavior is intended as correct - the 3.5 one seems correct to me but I am no expert. Then assuming the 3.5 behavior is correct, don't know if backporting a fix to supported versions with ruby Set is desirable. If i...Ethan (Ethan -)
Hash, Array, and String don't say the name of the class in their inspect, though. I'm certainly in favor of `Set[1, 2, 3]` (this is an improvement I make wherever I subclass Set already), but this seems orthogonal to identifying the c...Ethan (Ethan -)
Following #21216, Set#inspect stopped using self.class.name and just uses 'Set' now. ```ruby class MySet < Set; end MySet.new.inspect # before: #<MySet: {}> # now: #<Set: {}> ``` Ethan (Ethan -)
This is an inconsistency between the new core Set and the ruby-implemented Set. I think probably the new implementation's behavior seems correct and the ruby implementation is an incorrect edge case. ```ruby class MySet < Set end ...Ethan (Ethan -)
I have a subclass of Set that overrides #initialize. Following #21216, .new does call #initialize but .[] does not. ```ruby class MySet < Set def initialize(enum = nil) compare_by_identity super end end MySet.new....Ethan (Ethan -)