diff options
| author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2026-02-04 16:08:08 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-04 17:08:08 -0500 |
| commit | 48d2c7fd62342ec4f1d3b66768a537aea0968eda (patch) | |
| tree | 43076b9df1b2d6baeb07a402ed509b5ff29c91cb | |
| parent | 9167262940804951127b74aa3012c577a9b8ae09 (diff) | |
[DOC] Harmonize certain Module methods (#15804)
| -rw-r--r-- | object.c | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -1913,26 +1913,27 @@ rb_mod_eqq(VALUE mod, VALUE arg) /* * call-seq: - * mod <= other -> true, false, or nil + * self <= other -> true, false, or nil * - * Returns +true+ if +self+ is a descendant of +other+ - * (+self+ is a subclass of +other+ or +self+ includes +other+) or - * if +self+ is the same as +other+: + * Compares +self+ and +other+ with respect to ancestry and inclusion. * - * Float <= Numeric # => true - * Array <= Enumerable # => true - * Float <= Float # => true + * Returns +nil+ if there is no such relationship between the two: * - * Returns +false+ if +self+ is an ancestor of +other+ - * (+self+ is a superclass of +other+ or +self+ is included in +other+): + * Array <= Hash # => nil * - * Numeric <= Float # => false - * Enumerable <= Array # => false + * Otherwise, returns +true+ if +other+ is an ancestor of +self+, + * or if +self+ includes +other+, + * or if the two are the same: * - * Returns +nil+ if there is no relationship between the two: + * File <= IO # => true # IO is an ancestor of File. + * Array <= Enumerable # => true # Array includes Enumerable. + * Array <= Array # => true + * + * Otherwise, returns +false+: + * + * IO <= File # => false + * Enumerable <= Array # => false * - * Float <= Hash # => nil - * Enumerable <= String # => nil */ VALUE @@ -2011,7 +2012,9 @@ rb_mod_lt(VALUE mod, VALUE arg) /* * call-seq: - * mod >= other -> true, false, or nil + * self >= other -> true, false, or nil + * + * Compares +self+ and +other+ with respect to ancestry and inclusion. * * Returns +true+ if +self+ is an ancestor of +other+ * (+self+ is a superclass of +other+ or +self+ is included in +other+) or |
