* eval.c (rb_funcall2): allow to call protected methods.
fixed: [ruby-dev:27890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2267384c1b
commit
7d3b09acf2
@ -1,3 +1,8 @@
|
||||
Thu Dec 1 00:50:33 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_funcall2): allow to call protected methods.
|
||||
fixed: [ruby-dev:27890]
|
||||
|
||||
Wed Nov 30 23:52:17 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (struct parser_params): fields common to ripper must be
|
||||
|
6
eval.c
6
eval.c
@ -5768,13 +5768,13 @@ rb_call(VALUE klass, VALUE recv, ID mid,
|
||||
return method_missing(recv, mid, argc, argv, scope==2?CSTAT_VCALL:0);
|
||||
}
|
||||
|
||||
if (mid != missing) {
|
||||
if (mid != missing && scope == 0) {
|
||||
/* receiver specified form for private method */
|
||||
if ((noex & NOEX_PRIVATE) && scope == 0)
|
||||
if (noex & NOEX_PRIVATE)
|
||||
return method_missing(recv, mid, argc, argv, CSTAT_PRIV);
|
||||
|
||||
/* self must be kind of a specified form for protected method */
|
||||
if ((noex & NOEX_PROTECTED)) {
|
||||
if (noex & NOEX_PROTECTED) {
|
||||
VALUE defined_class = klass;
|
||||
|
||||
if (TYPE(defined_class) == T_ICLASS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user