2010/7/20 Vitaliy Yanchuk <fuksito / gmail.com>:
> Rob Biedenharn wrote:
>> Soo... that has a semi-colon and isn't then a one-liner?? ;-)
>
> Yeah, not perfectly one-liner. But it is without dot-chain breaking, not
> bad too :)

That would be a real one-liner if I could recall how to convert
elegantly an array of size2 arrays into an hash:

arr.group_by {|o| o}.collect{|k,v| [k,v.size]}

Cheers,

-- 
JJ Fleck
PCSI1 Lyc˝Ă Kl˝├er