summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index ffcf5be339..c8113e5b8e 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -379,7 +379,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) {
+ if (type == VM_METHOD_TYPE_ISEQ && rb_method_boundp(klass, mid, 0)) {
rb_warn("redefining `%s' may cause serious problems", rb_id2name(mid));
}
}