Max function in ruby

is there a max function in ruby?

eg max(number1, number2)

thanks

nayeem

2009/6/17 Developer In London [email protected]:

is there a max function in ruby?

eg max(number1, number2)

See module Enumerable - RDoc Documentation
so
[1,3,2].max #=> 3

Colin

thanks!

2009/6/17 Colin L. [email protected]

Colin


cashflowclublondon.co.uk

                  ("`-''-/").___..--''"`-._
                   `6_ 6  )   `-.  (     ).`-.__.`)
                   (_Y_.)'  ._   )  `._ `. ``-..-'
                 _..`--'_..-_/  /--'_.' ,'
                (il),-''  (li),'  ((!.-'

.