From: Hans Mackowiak Date: 2013-02-25T00:36:43+09:00 Subject: Re: How should I print only the last combination when using Array#combination(n) ? a.combination(2).reverse_each.first #=> [2, 3] a[-2..-1] #=> [2, 3] with block: a.combination(2).find {|x,y| x == 2 } #=> [2, 3] with block and index: a.combination(2).find.with_index {|(x,y),i| i == 2 } #=> [2, 3] -- Posted via http://www.ruby-forum.com/.