Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Set#proper_superset?
(self) -> bool
proper_superset?(set)
lib/set.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/set.rb, line 415
def proper_superset?(set)
case
when set.instance_of?(self.class) && @hash.respond_to?(:>)
@hash > set.instance_variable_get(:@hash)
when set.is_a?(Set)
size > set.size && set.all?(self)
else
raise ArgumentError, "value must be a set"
end
end
Returns true if the set is a proper superset of the given set.