diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-16 07:01:44 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-16 07:01:44 +0000 |
commit | 3dc8a69df7617377bbece579c6e1abf87df85299 (patch) | |
tree | c10d10e15a8be1091f2a66dd8cc1d33f25076c27 /vm_insnhelper.c | |
parent | 98cf9c43fa18bf0874af47b9d1b4933981ea456d (diff) | |
download | ruby-3dc8a69df7617377bbece579c6e1abf87df85299.tar.gz |
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@25796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 0660c7dd03..3654e39890 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 { |