From: William James Date: 2005-08-20T10:26:16+09:00 Subject: Re: Problem with sort! Vance A Heron wrote: > puts "\nSort to new array" > b = a.sort{ |a, b| a[0] <=> b[0] } > b.each{|v| puts "class(#{v.class}) #{v[0]}, #{v[1]}"} It's simpler with sort_by: b = a.sort_by{ |x| x[0] }