diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-12-20 22:57:00 +0000 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-12-20 18:12:56 -0500 |
| commit | 7c1e37cfe13cf2df21e4ca23c91f5a53c81bc062 (patch) | |
| tree | 92336c863157c3dcab13c911dbd3956ca2e76f66 /object.c | |
| parent | 48842525a8c3270b5dcc2b0a47f010658ef641a2 (diff) | |
[DOC] Tweaks for Module#<=>
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -2012,13 +2012,15 @@ rb_mod_gt(VALUE mod, VALUE arg) /* * call-seq: - * self <=> object -> -1, 0, +1, or nil + * self <=> other -> -1, 0, 1, or nil + * + * Compares +self+ and +other+. * * Returns: * - * - +-1+, if +self+ includes +object+, if or +self+ is a subclass of +object+. - * - +0+, if +self+ and +object+ are the same. - * - +1+, if +object+ includes +self+, or if +object+ is a subclass of +self+. + * - +-1+, if +self+ includes +other+, if or +self+ is a subclass of +other+. + * - +0+, if +self+ and +other+ are the same. + * - +1+, if +other+ includes +self+, or if +other+ is a subclass of +self+. * - +nil+, if none of the above is true. * * Examples: @@ -2029,8 +2031,10 @@ rb_mod_gt(VALUE mod, VALUE arg) * Enumerable <=> Array # => 1 * # Class File is a subclass of class IO. * File <=> IO # => -1 - * IO <=> File # => 1 * File <=> File # => 0 + * IO <=> File # => 1 + * # Class File has no relationship to class String. + * File <=> String # => nil * */ |
