summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 1c2959cbad..feea9852ec 100644
--- a/gc.c
+++ b/gc.c
@@ -915,7 +915,7 @@ static inline void gc_prof_set_heap_info(rb_objspace_t *);
#define TYPED_UPDATE_IF_MOVED(_objspace, _type, _thing) do { \
if (gc_object_moved_p(_objspace, (VALUE)_thing)) { \
- (_thing) = (_type)RMOVED((_thing))->destination; \
+ *((_type *)(&_thing)) = (_type)RMOVED((_thing))->destination; \
} \
} while (0)