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

ruby-changes:17664

From: akr <ko1@a...>
Date: Wed, 3 Nov 2010 07:37:15 +0900 (JST)
Subject: [ruby-changes:17664] Ruby:r29673 (trunk): * vm_method.c (rb_clear_cache_by_class): just return if the class has

akr	2010-11-03 07:37:08 +0900 (Wed, 03 Nov 2010)

  New Revision: 29673

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

  Log:
    * vm_method.c (rb_clear_cache_by_class): just return if the class has
      no method.  reported by Eric Wong.  [ruby-core:32689]

  Modified files:
    trunk/ChangeLog
    trunk/vm_method.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29672)
+++ ChangeLog	(revision 29673)
@@ -1,3 +1,8 @@
+Wed Nov  3 07:33:57 2010  Tanaka Akira  <akr@f...>
+
+	* vm_method.c (rb_clear_cache_by_class): just return if the class has
+	  no method.  reported by Eric Wong.  [ruby-core:32689]
+
 Tue Nov  2 22:50:25 2010  Aaron Patterson <aaron@t...>
 
 	* ext/psych/lib/psych/visitors/visitor.rb (initialize): push accessor
Index: vm_method.c
===================================================================
--- vm_method.c	(revision 29672)
+++ vm_method.c	(revision 29673)
@@ -85,6 +85,9 @@
 {
     struct cache_entry *ent, *end;
 
+    if (RCLASS_M_TBL(klass)->num_entries == 0)
+        return;
+
     rb_vm_change_state();
 
     if (!ruby_running)

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

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