diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2026-01-09 17:54:22 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2026-01-10 09:31:35 -0500 |
| commit | 0b83346f1c1f6e54c344307c2ec5f9d0a6f80317 (patch) | |
| tree | 970546a97537eef06212b28d1220f924a6a1711a /object.c | |
| parent | 98c414a678c2497dc522abf3802b2f78bfc856c4 (diff) | |
[DOC] Improve docs for Module#<
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -1967,13 +1967,24 @@ rb_class_inherited_p(VALUE mod, VALUE arg) * call-seq: * self < other -> true, false, or nil * - * Returns whether +self+ is a subclass of +other+, - * or +nil+ if there is no relationship between the two: + * Returns +true+ if +self+ is a descendant of +other+ + * (+self+ is a subclass of +other+ or +self+ includes +other+): * - * Float < Numeric # => true - * Numeric < Float # => false - * Float < Float # => false - * Float < Hash # => nil + * Float < Numeric # => true + * Array < Enumerable # => true + * + * Returns +false+ if +self+ is an ancestor of +other+ + * (+self+ is a superclass of +other+ or +self+ is included in +other+) or + * if +self+ is the same as +other+: + * + * Numeric < Float # => false + * Enumerable < Array # => false + * Float < Float # => false + * + * Returns +nil+ if there is no relationship between the two: + * + * Float < Hash # => nil + * Enumerable < String # => nil * */ |
