diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-12-19 12:45:36 +0000 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-12-19 17:09:10 -0500 |
| commit | d540903ee77e81dd1ec3dec744273fbb394238fa (patch) | |
| tree | bd1c8d0924de5fa5cc069cec97c54226224aad1d /compar.c | |
| parent | d9c0d4c71cd3500b2307c518b423ee58eeff9ae5 (diff) | |
[DOC] Harmonize <= methods
Diffstat (limited to 'compar.c')
| -rw-r--r-- | compar.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |
