summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index a28bd8edb0..86ff2ee3b3 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -304,7 +304,9 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_
default:
rb_bug("rb_add_method: unsupported method type (%d)\n", type);
}
- method_added(klass, mid);
+ if (type != VM_METHOD_TYPE_UNDEF) {
+ method_added(klass, mid);
+ }
return me;
}