From 98c414a678c2497dc522abf3802b2f78bfc856c4 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 9 Jan 2026 17:48:27 -0500 Subject: [DOC] Improve docs for Module#> --- object.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 7dda2b6c0d..c312859776 100644 --- a/object.c +++ b/object.c @@ -2011,20 +2011,23 @@ rb_mod_ge(VALUE mod, VALUE arg) * call-seq: * self > other -> true, false, or nil * - * If +self+ is a class, returns +true+ if +self+ is a superclass of +other+, - * returns +false+ if +self+ is the same as +other+ or if +self+ is a subclass - * of +other+, and returns +nil+ if there are no relationship between the two: + * Returns +true+ if +self+ is an ancestor of +other+ + * (+self+ is a superclass of +other+ or +self+ is included in +other+): * - * Numeric > Float # => true - * Float > Numeric # => false - * Float > Float # => false - * Float > Hash # => nil + * Numeric > Float # => true + * Enumerable > Array # => true * - * If +self+ is a module, returns +true+ if +other+ includes +self+, - * returns +false+ if +self+ is the same as +other+ or if +self+ includes - * +other+, and returns +nil+ if there are no relationship between the two: + * Returns +false+ 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+: * - * Enumerable > Array # => true + * Float > Numeric # => false + * Array > Enumerable # => false + * Float > Float # => false + * + * Returns +nil+ if there is no relationship between the two: + * + * Float > Hash # => nil * Enumerable > String # => nil * */ -- cgit v1.2.3