diff options
| -rw-r--r-- | internal/object.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/object.h b/internal/object.h index a6ff4e7476..3cf58d55d9 100644 --- a/internal/object.h +++ b/internal/object.h @@ -64,7 +64,9 @@ RBASIC_SET_CLASS(VALUE obj, VALUE klass) static inline size_t rb_obj_embedded_size(uint32_t fields_count) { +#if (defined(RACTOR_CHECK_MODE) && RACTOR_CHECK_MODE) || (defined(GC_DEBUG) && GC_DEBUG) if (fields_count < 1) fields_count = 1; +#endif return offsetof(struct RObject, as.ary) + (sizeof(VALUE) * fields_count); } #endif /* INTERNAL_OBJECT_H */ |
