fork download
  1. require 'set' #if RUBY_VERSION < 2.6
  2.  
  3. s = Set[1,2]
  4. p s.class
  5.  
  6. a = s.to_a
  7. p a
  8. p a.class
Success #stdin #stdout 0.01s 8416KB
stdin
Standard input is empty
stdout
Set
[1, 2]
Array