summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/object.c b/object.c
index 6bb3488153..4dfa7a44f8 100644
--- a/object.c
+++ b/object.c
@@ -790,6 +790,8 @@ rb_obj_is_kind_of(VALUE obj, VALUE c)
{
VALUE cl = CLASS_OF(obj);
+ // Note: YJIT needs this function to never allocate and never raise when
+ // `c` is a class or a module.
c = class_or_module_required(c);
return RBOOL(class_search_ancestor(cl, RCLASS_ORIGIN(c)));
}