prev = nil
result = ary.select{|v| v == prev ? false : (prev = v) }