Method: Set#to_a
- Defined in:
- lib/set.rb
#to_a ⇒ Object
Converts the set to an array. The order of elements is uncertain.
Set[1, 2].to_a #=> [1, 2]
Set[1, 'c', :s].to_a #=> [1, "c", :s]
192 193 194 |
# File 'lib/set.rb', line 192 def to_a @hash.keys end |