Range relies entirely on Enumerable to implement #min and #max, which
in turn implements these operations using #to_a. This becomes a
problem with ranges of floats, for example:

>> (0.0..100.0).min
TypeError: can't iterate from Float
        from (irb):9:in `each'
        from (irb):9
        from :0

Not to mention that it becomes inefficient to expand the whole range
into array, such as for very large integers:

>> (0.0..2**128).min

(Tends to run out of memory.)

I think it makes more sense to implement these operations in terms of
<=>, like so:

class Range

  def min
    (self.first <=> self.last) <= 0 ? self.first : nil
  end

  def max
    (self.first <=> self.last) <= 0 ? self.last : nil
  end

end

I don't see any reason to rely on expanding the range using
Enumerable#to_a, since the operations can be implemented purely in
terms of the range boundaries.

I would be happy to submit a patch.

Alexander.