Skip to content

Commit 612a668

Browse files
Remove spurious obj != klass check in shape_get_next
This should never be true. I added an `rb_bug` in case it was and it wasn't true in any of btest or test-all. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
1 parent d7e55f8 commit 612a668

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ shape_get_next(rb_shape_t *shape, enum shape_type shape_type, VALUE obj, ID id,
839839
}
840840

841841
// Check if we should update max_iv_count on the object's class
842-
if (obj != klass && new_shape->next_field_index > RCLASS_MAX_IV_COUNT(klass)) {
842+
if (new_shape->next_field_index > RCLASS_MAX_IV_COUNT(klass)) {
843843
RCLASS_SET_MAX_IV_COUNT(klass, new_shape->next_field_index);
844844
}
845845

0 commit comments

Comments
 (0)