summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-10-28 15:11:06 -0700
committerAaron Patterson <tenderlove@ruby-lang.org>2020-10-28 16:11:30 -0700
commitd8b0f1f7a84bf1ad85d649b125986ce181e79a58 (patch)
tree531fb5daaf3cad3a8d759eff16d2cdf18da0e8c7
parent58fd54f91472ba8aa96793ce2b131053a47527a0 (diff)
Objects are born embedded, so we don't need to check ivpr
It's not necessary to check ivpt because objects are allocated as "embedded" by default
-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)) {