summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 09:01:05 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-23 09:01:05 (GMT)
commitbc159ec502dd62f2b194c25357fd9f694b5f3f99 (patch)
tree0287837385313b6969f430447e9974a7978c3f43 /hash.c
parentcb62186b07659afa521467132ad865c94f938725 (diff)
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
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index dc29683..0cbc46b 100644
--- a/hash.c
+++ b/hash.c
@@ -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;
}