gabriele renzi wrote: >> longest_length = data.split(/\n/).map { |l| l.length }.max > longest= data.split(/\n/).sort_by{ |l| l.length }.last > > to get the line instead of the number of elements (I believe you're > keeping the array in memory to handle the lines more then one time) For something like this it would be great to have a .max_by built-in. Are there any good reasons for not having it? I might write a RCR for it soon. Regards, Florian Gross