From: Tsuyoshi Sawada Date: 2011-11-03T02:45:19+09:00 Subject: [ruby-dev:44775] [ruby-trunk - Feature #5549][Open] Comparable#min, Comparable#max Issue #5549 has been reported by Tsuyoshi Sawada. ---------------------------------------- Feature #5549: Comparable#min, Comparable#max http://redmine.ruby-lang.org/issues/5549 Author: Tsuyoshi Sawada Status: Open 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