From: Ruhe Date: 2008-02-17T04:19:59+09:00 Subject: Re: Iterate through array twice Yes, Ruby is the most beautiful language! On 16 ΖΕΧ, 21:20, Christopher Dicely wrote: > With Ruby 1.9: > > def find_square_sides(horiz_segments) > squares = Array.new > horiz_segments.combination(2) do |side, candidate| > if (...whatever...) > squares << Square.new(side, candidate) > end > end > end > > On Feb 16, 2008 6:49 AM, Ruhe wrote: