summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorMax Bernstein <ruby@bernsteinbear.com>2025-09-17 16:53:47 -0400
committerMax Bernstein <tekknolagi@gmail.com>2025-09-17 17:27:35 -0400
commitbacb687fd768c48b6042b1c0486a757915ad5eca (patch)
tree23a169e9e7f6d4e67fdf50b4a657882fe14b1e70 /object.c
parent1b0ca8f1f0ebabd440155ac8c373e7c49ba84df4 (diff)
ZJIT: Call instance allocation function directly
Diffstat (limited to 'object.c')
-rw-r--r--object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/object.c b/object.c
index c433e4bb17..c8d5960192 100644
--- a/object.c
+++ b/object.c
@@ -138,6 +138,9 @@ rb_class_allocate_instance(VALUE klass)
for (size_t i = 0; i < ROBJECT_FIELDS_CAPACITY(obj); i++) {
ptr[i] = Qundef;
}
+ if (rb_obj_class(obj) != rb_class_real(klass)) {
+ rb_bug("Expected rb_class_allocate_instance to set the class correctly");
+ }
#endif
return obj;