summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-12-20 22:57:00 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-12-20 18:12:56 -0500
commit7c1e37cfe13cf2df21e4ca23c91f5a53c81bc062 (patch)
tree92336c863157c3dcab13c911dbd3956ca2e76f66 /object.c
parent48842525a8c3270b5dcc2b0a47f010658ef641a2 (diff)
[DOC] Tweaks for Module#<=>
Diffstat (limited to 'object.c')
-rw-r--r--object.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/object.c b/object.c
index b2b7a9d960..93c8a483cf 100644
--- a/object.c
+++ b/object.c
@@ -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
*
*/