Hi Ronald,

Ronald Fischer wrote:
> Did I understand it right that there are no operators/functions
> predefined in Ruby for getting the minimum and maximum for two Fixnum?
> 
> I.e.
> 
>   def min(a,b)
>     a < b ? a : b
>   end
> 
> Or did I just overlook something?
> 
> Ronald

I think that min and max are very general, so they don't have to be 
limited to Fixnum.

How about [a, b].min or [a, b].max?

[1, 2].min #=> 1



Sam

-- 
Posted via http://www.ruby-forum.com/.