From: 7stud -- Date: 2012-09-17T13:25:55+09:00 Subject: Re: Breaking Down the Block z = y.select {|a, b| b == y[0][1]} p z --output:-- [[30, 2]] In this example the conditional b == y[0][1] is equivalent to b == 2. If instead you had results like this, [[10, 3], [30, 3], [20, 1], [40, 1]] ...then the conditional would be b == 3, which just selects all the numbers that tie for the most appearances in the original array. z = z.map {|a, b| a} p z --output:-- [30] map just selects the first element of all the sub arrays, which are the numbers that appear the most times in the original array. -- Posted via http://www.ruby-forum.com/.