From: Marnen Laibow-Koser Date: 2009-12-13T23:59:36+09:00 Subject: Re: Code block for element comparison in an array? Derek Cannon wrote: > Ah, I figured it out... For anyone who is interested the answer is: > > for i in 0..array.length-1 > for j in i+1..array.length-1 > // Comparison here! > end > end It would be more Rubyish to make the outer loop an each_with_index, I think. Best, --  Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.