Skip to content
instance method

Enumerable#to_set

() -> ::Set[Elem]
[T] () { (Elem) -> T } -> ::Set[T]
to_set(*args, &block)

Makes a set from the enumerable object with given arguments. Passing arguments to this method is deprecated.

Ruby version changes

  1. 4.0
See also #to_h #uniq #to_a #zip also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0