diff options
| author | Max Bernstein <ruby@bernsteinbear.com> | 2025-09-17 16:53:47 -0400 |
|---|---|---|
| committer | Max Bernstein <tekknolagi@gmail.com> | 2025-09-17 17:27:35 -0400 |
| commit | bacb687fd768c48b6042b1c0486a757915ad5eca (patch) | |
| tree | 23a169e9e7f6d4e67fdf50b4a657882fe14b1e70 /object.c | |
| parent | 1b0ca8f1f0ebabd440155ac8c373e7c49ba84df4 (diff) | |
ZJIT: Call instance allocation function directly
Diffstat (limited to 'object.c')
| -rw-r--r-- | object.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |
