Actions
Feature #5549
closedComparable#min, Comparable#max
Feature #5549:
Comparable#min, Comparable#max
Status:
Rejected
Assignee:
-
Target version:
-
Description
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.
Actions