diff options
author | Satoshi Tagomori <[email protected]> | 2024-04-12 18:31:22 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-12 18:31:22 +0900 |
commit | 7b8b936f4a1cd9a629c0465c287fd0ed40519ebe (patch) | |
tree | 8886bc3cc2c5fdd975a0e9d5a34bd3ce90c185bd /object.c | |
parent | 91c457e0914309a8949f15ee4be4e453951c5985 (diff) |
[DOC] Fix the wrong comment
This function checks the CL's superclasses containing the class C at
the end of it. That means C is a superclass of CL, not a subclass.
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -869,7 +869,7 @@ rb_obj_is_instance_of(VALUE obj, VALUE c) return RBOOL(rb_obj_class(obj) == c); } -// Returns whether c is a proper (c != cl) subclass of cl +// Returns whether c is a proper (c != cl) superclass of cl // Both c and cl must be T_CLASS static VALUE class_search_class_ancestor(VALUE cl, VALUE c) @@ -882,7 +882,7 @@ class_search_class_ancestor(VALUE cl, VALUE c) VALUE *classes = RCLASS_SUPERCLASSES(cl); // If c's inheritance chain is longer, it cannot be an ancestor - // We are checking for a proper subclass so don't check if they are equal + // We are checking for a proper superclass so don't check if they are equal if (cl_depth <= c_depth) return Qfalse; |