Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the wrong comment #10511

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;

Expand Down