1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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:
nobu 2013-12-23 09:01:05 +00:00
parent cb62186b07
commit bc159ec502

1
hash.c
View file

@ -41,6 +41,7 @@ has_extra_methods(VALUE klass)
while (c != base) {
st_table *mtbl = RCLASS_M_TBL(c);
if (mtbl && mtbl->num_entries) return klass;
c = RCLASS_SUPER(c);
}
return 0;
}