From: Rick DeNatale Date: 2006-09-13T06:06:35+09:00 Subject: Re: Maximum value of hash On 9/12/06, Just Another Victim of the Ambient Morality > Just in case you didn't realise this, the Array class (and, thus, _all_ > arrays) has the max method. Actually the Enumerable mixin module implements max, so any enumerable has it, and gives you the maximum element yielded by each (1..10).max #=> 10 {'a' => 1, 'b' => 7}.max #=> ["b", 7] "abc\ndef".max #=> "def" -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ IPMS/USA Region 12 Coordinator http://ipmsr12.denhaven2.com/ Visit the Project Mercury Wiki Site http://www.mercuryspacecraft.com/