-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
i found a potentially breaking change compared to the stdlib version of SortedSet
:
on Ruby 2.7:
require 'set'
SortedSet.new.include?(1) # => false
on Ruby 3.0:
require 'sorted_set'
SortedSet.new.include?(1) # => nil
RBTree
and Set
return false
in this case, but this code in set
leads to nil
being returned if anything other than a Hash
defaulting to false
is used as @hash
. I guess this could either be fixed here in sorted_set
by overriding #include?
and its aliases, or in set
by adding !!
or so to the return value?
eneagoe, shinpei-noda, guilpejon and sidk
Metadata
Metadata
Assignees
Labels
No labels