Set.classify を使って、設定した条件での分類をする。 Ref: http://www.ruby-doc.org/stdlib-2.1.2/libdoc/set/rdoc/Set.html#method-i-classify
require 'set'
dat = <<EOF
2010
2012
2014
2010
2019
EOF
dat = dat.lines.map(&:chomp)
dat = Set.new(dat)
h = dat.classify { |d| d.split.first.to_i > 2011 ? 'after 2011' : 'other' }
p h #=> {"other"=>#<Set: {"2010"}>, "after 2011"=>#<Set: {"2012", "2014", "2019"}>}