diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-02 22:37:08 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-02 22:37:08 +0000 |
commit | d295957957c828588a8ca3c7b8619c7a93be6b5c (patch) | |
tree | f66afd175fc08a363b71ba18f9f459fc167c7a57 | |
parent | 3d2e701396d014fa1aff49e3441ab1cf0ab63fd7 (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-- | 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) |