On Tue, Oct 31, 2006 at 10:15:35PM +0900, Brad Tilley wrote:
> What is the best way to get determine the largest and smallest int in an 
> array of ints? For example:
> 
> x = [1,2,3,4]
> 
> x.smallest should = 1
> x.largest should = 4
> 
> How is this done in Ruby?

[n6tadam@workstation fvwm]% irb
>> [1,2,3].max
=> 3
>> [1,2,3].min
=> 1

-- Thomas Adam

-- 
"Wanting to feel; to know what is real.  Living is a lie." -- Purpoise
Song, by The Monkees.