Enumerator What if you want Enumerable based on something other than each? require "enumerator" ary = [4,2,1] r = ary.to_enum(:each_with_index).reject{|x,i| i%2==0 } p r #=> [[4,0],[1,3]]