From bc159ec502dd62f2b194c25357fd9f694b5f3f99 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 23 Dec 2013 09:01:05 +0000 Subject: 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 --- hash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hash.c b/hash.c index dc29683c5c..0cbc46baf5 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; } -- cgit v1.2.3