summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-02 22:37:08 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-11-02 22:37:08 +0000
commitd295957957c828588a8ca3c7b8619c7a93be6b5c (patch)
treef66afd175fc08a363b71ba18f9f459fc167c7a57
parent3d2e701396d014fa1aff49e3441ab1cf0ab63fd7 (diff)
* vm_method.c (rb_clear_cache_by_class): just return if the class has
no method. reported by Eric Wong. [ruby-core:32689] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--vm_method.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f958addaa9..4f19050a46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Nov 3 07:33:57 2010 Tanaka Akira <akr@fsij.org>
+
+ * 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@tenderlovemaking.com>
* ext/psych/lib/psych/visitors/visitor.rb (initialize): push accessor
diff --git a/vm_method.c b/vm_method.c
index 41c53a5b47..fa5738b5cb 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -85,6 +85,9 @@ rb_clear_cache_by_class(VALUE klass)
{
struct cache_entry *ent, *end;
+ if (RCLASS_M_TBL(klass)->num_entries == 0)
+ return;
+
rb_vm_change_state();
if (!ruby_running)