From: Lars Christensen Date: 2008-09-05T16:29:13+09:00 Subject: Re: Need a 40 LOC (ignoring comments) to be shorter -- suggestions wanted On Sep 5, 7:34 am, "Eric I." wrote: > On Sep 4, 9:40 pm, RichardOnRails > > Any ideas/suggestions? > > Here's one solution that requires the 'permutation' gem: Ruby 1.8.7 and 1.9 has Array#permutation: (3..7).to_a.permutation.sort_by { |a| a[0..2].to_s.to_i * a[3..4].to_s.to_i }.first Golf anyone? :-) Lars