Actions
Feature #19600
closedMethod `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 takenil
as either or both of its arguments, or as either or both ends of its range argument. - Alias
Comparable#between?
asComparable#clamped?
Actions
Like0
Like0Like0Like0Like0Like0