Actions
Feature #19600
closedMethod `clamp?`
Feature #19600:
Method `clamp?`
Status:
Closed
Assignee:
-
Target version:
-
Description
Currently, we have pairs of non-predicate and predicate methods like String#match and String#match?. Along this line, I propose the following. They are brain-friendly, and make programmers happier by saving them from terminology hell.
- Since by #19588,
Comparable#clamp's behavior is made the same asRange#cover?for range arguments, aliasRange#cover?asRange#clamp?. - Synchronize the specification of
Comparable#between?withComparable#clamp, i.e.,
a. AllowComparable#between?to take a range argument, and
b. AllowComparable#between?to takenilas either or both of its arguments, or as either or both ends of its range argument. - Alias
Comparable#between?asComparable#clamped?
Actions