summaryrefslogtreecommitdiff
path: root/lib/set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/set.rb')
-rw-r--r--lib/set.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/set.rb b/lib/set.rb
index 625046d37c..2bd2a0ffa5 100644
--- a/lib/set.rb
+++ b/lib/set.rb
@@ -641,6 +641,12 @@ class Set
end
end
+ # Returns a string created by converting each element of the set to a string
+ # See also: Array#join
+ def join(separator=nil)
+ to_a.join(separator)
+ end
+
InspectKey = :__inspect_key__ # :nodoc:
# Returns a string containing a human-readable representation of the
@@ -684,3 +690,5 @@ module Enumerable
klass.new(self, *args, &block)
end
end
+
+autoload :SortedSet, "#{__dir__}/set/sorted_set"