We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c91cb76 + a992d79 commit f5e7870Copy full SHA for f5e7870
variable.c
@@ -1605,7 +1605,7 @@ rb_ivar_count(VALUE obj)
1605
switch (BUILTIN_TYPE(obj)) {
1606
case T_OBJECT:
1607
if ((tbl = ROBJECT_IV_INDEX_TBL(obj)) != 0) {
1608
- st_index_t i, count, num = tbl->num_entries;
+ st_index_t i, count, num = ROBJECT_NUMIV(obj);
1609
const VALUE *const ivptr = ROBJECT_IVPTR(obj);
1610
for (i = count = 0; i < num; ++i) {
1611
if (ivptr[i] != Qundef) {
0 commit comments