Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > setライブラリ > Setクラス > to_a

instance method Set#to_a

to_a -> Array

自身を配列に変換します。要素の順序は不定です。

set = Set['hello', 'world']
p set.to_a
#=> ["world", "hello"]
class Set