summaryrefslogtreecommitdiff
path: root/compar.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-12-19 12:45:36 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-12-19 17:09:10 -0500
commitd540903ee77e81dd1ec3dec744273fbb394238fa (patch)
treebd1c8d0924de5fa5cc069cec97c54226224aad1d /compar.c
parentd9c0d4c71cd3500b2307c518b423ee58eeff9ae5 (diff)
[DOC] Harmonize <= methods
Diffstat (limited to 'compar.c')
-rw-r--r--compar.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/compar.c b/compar.c
index c577e4741f..eda7e83824 100644
--- a/compar.c
+++ b/compar.c
@@ -141,10 +141,15 @@ cmp_lt(VALUE x, VALUE y)
/*
* call-seq:
- * obj <= other -> true or false
+ * self <= other -> true or false
+ *
+ * Returns whether +self+ is "less than or equal to" +other+;
+ * equivalent to <tt>(self <=> other) <= 0</tt>:
+ *
+ * 'foo' <= 'foo' # => true
+ * 'foo' <= 'food' # => true
+ * 'food' <= 'foo' # => false
*
- * Compares two objects based on the receiver's <code><=></code>
- * method, returning true if it returns a value less than or equal to 0.
*/
static VALUE