summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-11 17:19:28 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-11 17:19:28 +0000
commit047b553920b55fa5efbabd5f8a31b1a8bf829f45 (patch)
tree1438d1f0f29ec94f7c792df9e5fa3eabc33f7c13 /vm_method.c
parenta5d40b289fde6afec9341af04642d4d3c3c8be28 (diff)
merge revision(s) 39742,39743: [Backport #8005]
assertions.rb: private flag * lib/test/unit/assertions.rb (assert_respond_to): accept optional include-private flag. * 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/branches/ruby_2_0_0@40252 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 1dbbdd511b..951ee4e6a8 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -752,7 +752,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;