Method: Enumerable#max

Defined in:
enum.c

#maxObject #max {|a, b| ... } ⇒ Object

Returns the object in enum with the maximum value. The first form assumes all objects implement Comparable; the second uses the block to return a <=> b.

a = %w(albatross dog horse)
a.max                                  #=> "horse"
a.max {|a,b| a.length <=> b.length }   #=> "albatross"

Overloads:



733
734
735
# File 'enum.c', line 733

static VALUE
enum_max(obj)
VALUE obj;