From: Love U Ruby Date: 2013-02-25T00:42:22+09:00 Subject: Re: How should I print only the last combination when using Array#combination(n) ? Hans Mackowiak wrote in post #1098791: The below tips I am looking for. Thanks @Hans :) > 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/.