summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/class.c b/class.c
index 1281a243ab..9739aadc73 100644
--- a/class.c
+++ b/class.c
@@ -208,6 +208,9 @@ class_alloc(VALUE flags, VALUE klass)
#if USE_RVARGC
memset(RCLASS_EXT(obj), 0, sizeof(rb_classext_t));
+# if SIZEOF_SERIAL_T != SIZEOF_VALUE
+ RCLASS(obj)->class_serial_ptr = ZALLOC(rb_serial_t);
+# endif
#else
obj->ptr = ZALLOC(rb_classext_t);
#endif