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

ruby-changes:16818

From: akr <ko1@a...>
Date: Sun, 1 Aug 2010 09:46:33 +0900 (JST)
Subject: [ruby-changes:16818] Ruby:r28813 (trunk): * class.c (rb_include_module): don't clear the method cache if the

akr	2010-08-01 09:46:18 +0900 (Sun, 01 Aug 2010)

  New Revision: 28813

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

  Log:
    * class.c (rb_include_module): don't clear the method cache if the
      included module has no method.

  Modified files:
    trunk/ChangeLog
    trunk/class.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28812)
+++ ChangeLog	(revision 28813)
@@ -1,3 +1,8 @@
+Sun Aug  1 09:44:25 2010  Tanaka Akira  <akr@f...>
+
+	* class.c (rb_include_module): don't clear the method cache if the
+	  included module has no method.
+
 Sun Aug  1 09:21:32 2010  Tanaka Akira  <akr@f...>
 
 	* ext/pathname/pathname.c (path_sub): Pathname#sub translated
Index: class.c
===================================================================
--- class.c	(revision 28812)
+++ class.c	(revision 28813)
@@ -659,7 +659,8 @@
 	    }
 	}
 	c = RCLASS_SUPER(c) = include_class_new(module, RCLASS_SUPER(c));
-	changed = 1;
+	if (RMODULE_M_TBL(module) && RMODULE_M_TBL(module)->num_entries)
+	    changed = 1;
       skip:
 	module = RCLASS_SUPER(module);
     }

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

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