summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 09:36:35 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 09:36:35 +0000
commit960e8a419f9bbf4b48f534c66972e833d56e8289 (patch)
tree48cab811a8b3f011dc829cf0762c331cfb2031ba /vm_method.c
parentc29c44c4544896cf3e9d0788f52597e1f73dce02 (diff)
* vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
enable/disable global method caching. [ruby-dev:46203] [Bug #7111] * vm_method.c (rb_method_entry_get_with_omod): don't use global method cache if OPT_GLOBAL_METHOD_CACHE is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm_method.c b/vm_method.c
index c5b33caa58..51724bc248 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -497,6 +497,7 @@ rb_method_entry_t *
rb_method_entry_get_with_omod(VALUE omod, VALUE klass, ID id,
VALUE *defined_class_ptr)
{
+#if OPT_GLOBAL_METHOD_CACHE
struct cache_entry *ent;
ent = cache + EXPR1(klass, omod, id);
@@ -506,6 +507,7 @@ rb_method_entry_get_with_omod(VALUE omod, VALUE klass, ID id,
*defined_class_ptr = ent->defined_class;
return ent->me;
}
+#endif
return rb_method_entry_get_without_cache(klass, omod, id,
defined_class_ptr);