summaryrefslogtreecommitdiff
path: root/internal/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'internal/object.h')
-rw-r--r--internal/object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/object.h b/internal/object.h
index aa820128c7..2af90c1fdc 100644
--- a/internal/object.h
+++ b/internal/object.h
@@ -47,8 +47,8 @@ MJIT_SYMBOL_EXPORT_END
static inline void
RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
{
- struct { VALUE flags; VALUE klass; } *ptr = (void *)obj;
- ptr->klass = klass;
+ const VALUE *ptr = &RBASIC(obj)->klass;
+ *(VALUE *)ptr = klass;
}
static inline void