summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-23 16:02:46 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-23 16:02:46 (GMT)
commit2c8db2c24cea3478664395ca62563ed22227eae6 (patch)
treef15971cbec6be7c1afba47ce94ce9896f8eac6b6 /vm_method.c
parentf72c0b5c787df88aedb0270d354e8dca9326ce45 (diff)
vm_method.c: get rid of cache
* vm_method.c (rb_method_entry_make): get rid of storing method cache, so that the added method will be called later. [ruby-dev:48691] [Bug #10421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index c8113e5..da77331 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -199,6 +199,7 @@ rb_free_method_entry(rb_method_entry_t *me)
xfree(me);
}
+static inline rb_method_entry_t *search_method(VALUE klass, ID id, VALUE *defined_class_ptr);
static int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
static inline rb_method_entry_t *
@@ -379,7 +380,7 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type,
}
/* check mid */
if (mid == object_id || mid == id__send__) {
- if (type == VM_METHOD_TYPE_ISEQ && rb_method_boundp(klass, mid, 0)) {
+ if (type == VM_METHOD_TYPE_ISEQ && search_method(klass, mid, 0)) {
rb_warn("redefining `%s' may cause serious problems", rb_id2name(mid));
}
}