Discriminate first and last element in each? Discriminate first and last element in each? ruby ruby