diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_method.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Jul 12 17:12:45 2011 Yukihiro Matsumoto <matz@ruby-lang.org> + + * vm_method.c (rb_add_method): should not call method_added hook + for undef operation. [Bug #5015] + Tue Jul 12 16:58:44 2011 Shota Fukumori <sorah@tubusu.net> * lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug. 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; } |