Counting sort with Ruby