aboutsummaryrefslogtreecommitdiffstats
path: root/compar.c
diff options
context:
space:
mode:
authorMarcus Stollsteimer <sto.mar@web.de>2019-12-23 15:02:59 +0100
committerMarcus Stollsteimer <sto.mar@web.de>2019-12-23 15:02:59 +0100
commit16fddfe352828d26aaa6cdbce696e62de04511ce (patch)
tree61ec9a58a34fe33e10f849ae5e56a7ba6c8a1409 /compar.c
parent9a42e0c7ed4dcc57043a8a35a50686625adba686 (diff)
downloadruby-16fddfe352828d26aaa6cdbce696e62de04511ce.tar.gz
[DOC] Improve readability of requirements for <=>
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compar.c b/compar.c
index e9b1d4bfcc..94072c9fc1 100644
--- a/compar.c
+++ b/compar.c
@@ -253,9 +253,9 @@ cmp_clamp(int argc, VALUE *argv, VALUE x)
/*
* The Comparable mixin is used by classes whose objects may be
* ordered. The class must define the <code><=></code> operator,
- * which compares the receiver against another object, returning
- * a value less than 0, 0, or a value greater than 0, depending on
- * whether the receiver is less than, equal to,
+ * which compares the receiver against another object, returning a
+ * value less than 0, returning 0, or returning a value greater than 0,
+ * depending on whether the receiver is less than, equal to,
* or greater than the other object. If the other object is not
* comparable then the <code><=></code> operator should return +nil+.
* Comparable uses <code><=></code> to implement the conventional