summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-14 01:30:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-14 01:30:47 +0000
commit01e43fb0e23c2c0c89454945a71db733fbf77409 (patch)
tree2c300d0e017b4388d70ce05c421d7d1721288c85 /vm_method.c
parent8c5a6fb6843b865f2b1fb622037f312daa7be6a7 (diff)
vm_method.c: fix method_removed
* vm_method.c: call method_removed hook on called class, not on prepending iclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index a82ba5faea..1dbbdd511b 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -648,6 +648,7 @@ remove_method(VALUE klass, ID mid)
{
st_data_t key, data;
rb_method_entry_t *me = 0;
+ VALUE self = klass;
klass = RCLASS_ORIGIN(klass);
if (klass == rb_cObject) {
@@ -674,7 +675,7 @@ remove_method(VALUE klass, ID mid)
rb_clear_cache_for_undef(klass, mid);
rb_unlink_method_entry(me);
- CALL_METHOD_HOOK(klass, removed, mid);
+ CALL_METHOD_HOOK(self, removed, mid);
}
void