Fix SortedSet subclasses that override initialize
The first time SortedSet#initialize is called, it overwrites itself, then recalls #initialize, which results in calling the subclass's initialize, not the current initialize. Just inline the default initialize behavior to avoid this issue. No test for this as it can only be triggered the very first time that SortedSet#initialize is called. Fixes [Bug #15830]
This commit is contained in:
parent
2d076dd5ac
commit
258843106f
@ -804,7 +804,8 @@ class SortedSet < Set
|
||||
|
||||
def initialize(*args, &block) # :nodoc:
|
||||
SortedSet.setup
|
||||
initialize(*args, &block)
|
||||
@keys = nil
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user