diff options
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |