Classify a set into three
require 'set' s = ["a","b","c",1, 2, 3, -1.0, -2.0, -4.0].to_set p s.classify { |x| x.class }