summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index dd9f09157e7..8d7449aaa55 100644
--- a/gc.c
+++ b/gc.c
@@ -2734,8 +2734,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
switch (BUILTIN_TYPE(obj)) {
case T_OBJECT:
- if ((RANY(obj)->as.basic.flags & ROBJECT_EMBED) ||
- RANY(obj)->as.object.as.heap.ivptr == NULL) {
+ if (RANY(obj)->as.basic.flags & ROBJECT_EMBED) {
RB_DEBUG_COUNTER_INC(obj_obj_embed);
}
else if (ROBJ_TRANSIENT_P(obj)) {