summaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-16 07:01:44 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-16 07:01:44 +0000
commite2277a5eaf663b0d1eb7d4985ffca1fdb00be0d1 (patch)
treec10d10e15a8be1091f2a66dd8cc1d33f25076c27 /vm_insnhelper.c
parent7be6cbef51c76402295bb6638b1b53adde6e8e2d (diff)
downloadruby-e2277a5eaf663b0d1eb7d4985ffca1fdb00be0d1.tar.gz
ruby-e2277a5eaf663b0d1eb7d4985ffca1fdb00be0d1.tar.xz
ruby-e2277a5eaf663b0d1eb7d4985ffca1fdb00be0d1.zip
* vm_insnhelper.c (vm_call_method): protected singleton methods of
an object should not be able to called from other instances of the class of the object. [ruby-core:26761] * vm_eval.c (rb_method_call_status): ditto. * test/ruby/test_module.rb (test_protected_singleton_method): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0660c7dd0..3654e3989 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -623,7 +623,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
defined_class = RBASIC(defined_class)->klass;
}
- if (!rb_obj_is_kind_of(cfp->self, rb_class_real(defined_class))) {
+ if (!rb_obj_is_kind_of(cfp->self, defined_class)) {
val = vm_method_missing(th, id, recv, num, blockptr, NOEX_PROTECTED);
}
else {