From dd3501bb9580951623a9aa7c2f86f7c98f9d6b9c Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Thu, 17 Feb 2022 18:02:42 +0900 Subject: Make Set a builtin feature [Feature #16989] --- lib/set.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/set.rb b/lib/set.rb index 7832c848cf..852c13a534 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -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" -- cgit v1.2.3