Issue #5549 has been updated by Yukihiro Matsumoto.

Status changed from Open to Rejected

???????????????????????????????????????
?????????????? a.min(b) ???????????????????Enumerable??????????????????(大?????)???????????????????????????????????????????????????????????(大?????)??????????????????述???????????????????????????述???????????????????min,max????????????? >, < ???使???????????????????????????????????????????Comparable????義????????????????
----------------------------------------
Feature #5549: Comparable#min, Comparable#max
http://redmine.ruby-lang.org/issues/5549

Author: Tsuyoshi Sawada
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 


I request the following methods

    Comparable#min(other)
    Comparable#max(other)

which will work the same as

    [self, other].min
    [self, other].max

and can be defined as

    module Comparable
	def min other; [self, other].min end
	def max other; [self, other].max end
    end

Example use case: If you need to ensure that some calculated value becomes at least zero within a method chain.


-- 
http://redmine.ruby-lang.org