diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 03:23:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 03:23:42 +0000 |
commit | f2c319395ddb3239f4bf71861db3dc0c175c32bd (patch) | |
tree | 69a841d55b8f1734029c8e3aa12013a8f7dca2b5 /vm.c | |
parent | c7005118880ceeff65b300479317ca8387ec1246 (diff) | |
download | ruby-f2c319395ddb3239f4bf71861db3dc0c175c32bd.tar.gz |
vm.c: reduce clearing method cache
* vm_method.c (rb_add_method, rb_alias): rb_method_entry_set()
already clears method cache.
* vm_method.c (rb_export_method): ditto by rb_add_method().
* vm_method.c (set_method_visibility): ditto by rb_export_method().
* vm.c (vm_define_method): ditto by rb_add_method().
* vm.c (m_core_undef_method): ditto by rb_add_method() in rb_undef().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -2153,12 +2153,10 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval, OBJ_WRITE(miseq->self, &miseq->klass, klass); miseq->defined_method_id = id; rb_add_method(klass, id, VM_METHOD_TYPE_ISEQ, miseq, noex); - rb_clear_method_cache_by_class(klass); if (!is_singleton && noex == NOEX_MODFUNC) { klass = rb_singleton_class(klass); rb_add_method(klass, id, VM_METHOD_TYPE_ISEQ, miseq, NOEX_PUBLIC); - rb_clear_method_cache_by_class(klass); } } @@ -2208,7 +2206,6 @@ m_core_undef_method(VALUE self, VALUE cbase, VALUE sym) { REWIND_CFP({ rb_undef(cbase, SYM2ID(sym)); - rb_clear_method_cache_by_class(cbase); rb_clear_method_cache_by_class(self); }); return Qnil; |