mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
[DOC] Improve docs for Module#>=
This commit is contained in:
parent
f0f4a683b4
commit
0d4538b57d
Notes:
git
2026-01-10 14:32:06 +00:00
23
object.c
23
object.c
@ -2013,11 +2013,24 @@ rb_mod_lt(VALUE mod, VALUE arg)
|
||||
* call-seq:
|
||||
* mod >= other -> true, false, or nil
|
||||
*
|
||||
* Returns true if <i>mod</i> is an ancestor of <i>other</i>, or the
|
||||
* two modules are the same. Returns
|
||||
* <code>nil</code> if there's no relationship between the two.
|
||||
* (Think of the relationship in terms of the class definition:
|
||||
* "class A < B" implies "B > A".)
|
||||
* Returns +true+ 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 # => true
|
||||
* Enumerable >= Array # => true
|
||||
* Float >= Float # => true
|
||||
*
|
||||
* Returns +false+ if +self+ is a descendant of +other+
|
||||
* (+self+ is a subclass of +other+ or +self+ includes +other+):
|
||||
*
|
||||
* Float >= Numeric # => false
|
||||
* Array >= Enumerable # => false
|
||||
*
|
||||
* Returns +nil+ if there is no relationship between the two:
|
||||
*
|
||||
* Float >= Hash # => nil
|
||||
* Enumerable >= String # => nil
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user