From: sto.mar@... Date: 2013-02-25T00:48:34+09:00 Subject: Re: How should I print only the last combination when using Array#combination(n) ? Am 24.02.2013 16:42, schrieb Love U Ruby: > 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] a.combination(2).to_a[2] # => [2, 3] Why do you insist on using the block version when you already know the index? --