ruby: grade-school: stripped-down implementation of a sorted array