is there a max function in ruby?
eg max(number1, number2)
thanks
nayeem
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
("`-''-/").___..--''"`-._
`6_ 6 ) `-. ( ).`-.__.`)
(_Y_.)' ._ ) `._ `. ``-..-'
_..`--'_..-_/ /--'_.' ,'
(il),-'' (li),' ((!.-'
.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs