On 4/29/07, James Edward Gray II <james / grayproductions.net> wrote:

> > (since there's no max_by :-)
>
> Well, not yet:
when I said that above I just dreamt, I had no clue, conclusion =>
YARV fulfills your wildest dreams ;)
>
> $ ruby_yarv -e 'p %w[c bb aaa].max_by { |e| e.to_s.size }'
> "aaa"
 I guess there will be a #min_by too,
how does it break ties? Well I ask too much I gotta go the last snapshot...

BTW instead of
   a[ rand(a.size) ]
we can write
   a.max_by{ rand }
now; LOL!

Robert
-- 
You see things; and you say Why?
But I dream things that never were; and I say Why not?
-- George Bernard Shaw