mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
Make Set a builtin feature [Feature #16989]
This commit is contained in:
parent
7757ccb504
commit
dd3501bb95
Notes:
git
2022-02-18 11:56:45 +09:00
3 changed files with 49 additions and 1 deletions
|
@ -854,7 +854,7 @@ module Enumerable
|
|||
# Needs to `require "set"` to use this method.
|
||||
def to_set(klass = Set, *args, &block)
|
||||
klass.new(self, *args, &block)
|
||||
end
|
||||
end unless method_defined?(:to_set)
|
||||
end
|
||||
|
||||
autoload :SortedSet, "#{__dir__}/set/sorted_set"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue