summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-12 00:42:37 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-12 00:42:37 +0000
commit7d86051f256eac912e47a205c8e6d6125141a188 (patch)
tree7617b3309e56581b1e051181efa4c8a8a7007bc9 /vm_method.c
parent16c364121b8fe725087dadad8c19f45a4eddc958 (diff)
merge revision(s) 32527,32567: [Backport #6004]
* 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/branches/ruby_1_9_3@34566 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 239b3887cb..7cf816a66a 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -318,7 +318,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;
}