instance method
Set::SubclassCompatible#to_set
to_set(*args, &block)
lib/set/subclass_compatible.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/set/subclass_compatible.rb, line 72
def to_set(*args, &block)
klass = if args.empty?
Set
else
warn "passing arguments to Enumerable#to_set is deprecated", uplevel: 1
args.shift
end
return self if instance_of?(Set) && klass == Set && block.nil? && args.empty?
klass.new(self, *args, &block)
end
No documentation available