From: Adam Prescott Date: 2010-09-10T06:55:04+09:00 Subject: Re: Key Associated w/ Maximum Value in Hash This won't capture multiple maximum values, but: hash.invert[hash.values.max] I'd be interested to see a benchmark profile of the suggestions. On Thu, Sep 9, 2010 at 4:37 PM, Brian Candler wrote: > hash.sort_by { |k,v| v }[-1][0] > -- > Posted via http://www.ruby-forum.com/. > >