diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-19 23:53:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-19 23:53:12 +0000 |
commit | 64e3516b2497c734baf81527885a76239c898ee5 (patch) | |
tree | c9885fd321617b032fefc19e873ae1a6c8e83189 /proc.c | |
parent | 26787c7b29d3612c78306e2a9ea0382f089b5a2b (diff) | |
download | ruby-64e3516b2497c734baf81527885a76239c898ee5.tar.gz |
vm_method.c: reuse method entry
* vm_method.c (rb_obj_respond_to): reuse found method entry
instead of searching same entry repeatedly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2249,8 +2249,8 @@ method_def_location(const rb_method_definition_t *def) return iseq_location(method_def_iseq(def)); } -static VALUE -method_entry_location(const rb_method_entry_t *me) +VALUE +rb_method_entry_location(const rb_method_entry_t *me) { if (!me) return Qnil; return method_def_location(me->def); @@ -2260,7 +2260,7 @@ VALUE rb_mod_method_location(VALUE mod, ID id) { const rb_method_entry_t *me = original_method_entry(mod, id); - return method_entry_location(me); + return rb_method_entry_location(me); } VALUE |