summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-12 08:15:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-12 08:15:47 +0000
commitba5d78581af66d6bb821f6dce40fcadc6727d929 (patch)
tree9d035cdfc5b53d4ebc7e9c98c3d2aa1e91b026d4 /vm_method.c
parent1d4da24e2148a81ccbcb6bbc4aebf875fa4c2e34 (diff)
* vm_method.c (rb_add_method): should not call method_added hook
for undef operation. [Bug #5015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;
}