require
"set"
# Contains three elements.
set1 = Set.new [10, 20, 30]
# Is a superset of set1.
set2 = Set.new [10, 20, 30, 40, 50]
# This is true.
if set1 <= set2
puts true
end
# This is not evaluated to true.
if set2 <= set1
puts false
end
# This is true.
# ... Subset is the same as the <= operator.
if set1.subset?(set2)
puts true
end
true
true