Method: Enumerable#min
- Defined in:
- enum.c
#min ⇒ Object #min {|a, b| ... } ⇒ Object
Returns the object in enum with the minimum value. The first form assumes all objects implement Comparable; the second uses the block to return a <=> b.
a = %w(albatross dog horse)
a.min #=> "albatross"
a.min {|a,b| a.length <=> b.length } #=> "dog"
656 657 658 |
# File 'enum.c', line 656 static VALUE enum_min(obj) VALUE obj; |