summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gc.c b/gc.c
index fe5c5cff0d..968c13333c 100644
--- a/gc.c
+++ b/gc.c
@@ -3263,13 +3263,9 @@ rb_gc_mark_children(void *objspace, VALUE obj)
if (fields_count) {
VALUE klass = RBASIC_CLASS(obj);
- // Skip updating max_iv_count if the prime classext is not writable
- // because GC context doesn't provide information about namespaces.
- if (RCLASS_PRIME_CLASSEXT_WRITABLE_P(klass)) {
- // Increment max_iv_count if applicable, used to determine size pool allocation
- if (RCLASS_MAX_IV_COUNT(klass) < fields_count) {
- RCLASS_SET_MAX_IV_COUNT(klass, fields_count);
- }
+ // Increment max_iv_count if applicable, used to determine size pool allocation
+ if (RCLASS_MAX_IV_COUNT(klass) < fields_count) {
+ RCLASS_SET_MAX_IV_COUNT(klass, fields_count);
}
}