summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-01-29 21:27:53 -0800
committerJohn Hawthorn <john@hawthorn.email>2022-02-23 19:57:42 -0800
commit764e4fa850de749790e5ed11c8a4ab86a4499ac0 (patch)
tree29386c80ba035a2fee18c68dd9cb27f5b3ebe9d2 /object.c
parent709a6a078642e30c310e7355202a29e529361776 (diff)
Never call kind_of with klass=0
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5568
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 f056767f13..ff94469292 100644
--- a/object.c
+++ b/object.c
@@ -791,6 +791,8 @@ rb_obj_is_kind_of(VALUE obj, VALUE c)
{
VALUE cl = CLASS_OF(obj);
+ RUBY_ASSERT(cl);
+
// 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);