summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-13 05:51:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-13 05:51:32 +0000
commitbe909b5e95e5ba56eadb42e6dbc9102c1188ae48 (patch)
tree3a7b71665e487ecab7322ec9b6f72164fe79767a /vm_method.c
parent49a22e173b8d8e95eb3b891669329b8a07c43e70 (diff)
vm_method.c: overrid flag of prepending method
* vm_method.c (rb_export_method): directly override the flag of method defined in prepending class too, not adding zsuper entry. [ruby-core:53106] [Bug #8005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39743 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 effc4a453a..6d0865f9d8 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -754,7 +754,8 @@ rb_export_method(VALUE klass, ID name, rb_method_flag_t noex)
if (me->flag != noex) {
rb_vm_check_redefinition_opt_method(me, klass);
- if (klass == defined_class) {
+ if (klass == defined_class ||
+ RCLASS_ORIGIN(klass) == defined_class) {
me->flag = noex;
if (me->def->type == VM_METHOD_TYPE_REFINED) {
me->def->body.orig_me->flag = noex;