diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_method.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -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) |