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 + + * 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 * 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)