[前][次][番号順一覧][スレッド一覧]

ruby-changes:32284

From: nobu <ko1@a...>
Date: Mon, 23 Dec 2013 18:01:10 +0900 (JST)
Subject: [ruby-changes:32284] nobu:r44363 (trunk): hash.c: fix infinite loop

nobu	2013-12-23 18:01:05 +0900 (Mon, 23 Dec 2013)

  New Revision: 44363

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44363

  Log:
    hash.c: fix infinite loop
    
    * hash.c (has_extra_methods): traverse ancestors, and fix infinite
      loop.  [Bug #9275]

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 44362)
+++ hash.c	(revision 44363)
@@ -41,6 +41,7 @@ has_extra_methods(VALUE klass) https://github.com/ruby/ruby/blob/trunk/hash.c#L41
     while (c != base) {
 	st_table *mtbl = RCLASS_M_TBL(c);
 	if (mtbl && mtbl->num_entries) return klass;
+	c = RCLASS_SUPER(c);
     }
     return 0;
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]