From: nobuyoshi nakada Date: 2005-12-06T17:47:03+09:00 Subject: Re: getting around access control Hi, At Tue, 6 Dec 2005 16:04:39 +0900, Ara.T.Howard wrote in [ruby-talk:169057]: > c.instance_eval{ p meth } > > this throws an error, of course, but i'm too tired to remember how to work > around it. Hmmm, it seems to have changed unintentionally, together with rb_funcall2(), at Dec 1. Should I fix it? Index: eval.c =================================================================== RCS file: /cvs/ruby/src/ruby/eval.c,v retrieving revision 1.616.2.135 diff -U2 -p -u -r1.616.2.135 eval.c --- eval.c 30 Nov 2005 15:51:05 -0000 1.616.2.135 +++ eval.c 6 Dec 2005 08:46:32 -0000 @@ -5901,11 +5901,11 @@ rb_call(klass, recv, mid, argc, argv, sc } - if (mid != missing && scope == 0) { + if (mid != missing) { /* receiver specified form for private method */ - if (noex & NOEX_PRIVATE) + if ((noex & NOEX_PRIVATE) && && scope == 0) 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) && scope < 3) { VALUE defined_class = klass; -- Nobu Nakada