hash.c: fix infinite loop
* hash.c (has_extra_methods): traverse ancestors, and fix infinite loop. [Bug #9275] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cb62186b07
commit
bc159ec502
1
hash.c
1
hash.c
@ -41,6 +41,7 @@ has_extra_methods(VALUE klass)
|
|||||||
while (c != base) {
|
while (c != base) {
|
||||||
st_table *mtbl = RCLASS_M_TBL(c);
|
st_table *mtbl = RCLASS_M_TBL(c);
|
||||||
if (mtbl && mtbl->num_entries) return klass;
|
if (mtbl && mtbl->num_entries) return klass;
|
||||||
|
c = RCLASS_SUPER(c);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user