https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112010-05-27T17:45:08ZRuby Issue Tracking SystemRuby master - Bug #3352: Delegates: protected methodshttps://bugs.ruby-lang.org/issues/3352?journal_id=112812010-05-27T17:45:08Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Rejected</i></li></ul><p>=begin<br>
See <a href="https://blade.ruby-lang.org/ruby-core/30453">[ruby-core:30453]</a>.</p>
<p>Currently, there is no way for callee to know whether the method is<br>
called as function style (without receiver) or normal method style<br>
(with receiver).<br>
So the call must be succeeded conservatively.</p>
<p>And, Marc-Andre, please take a look at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: lib/delegate: security model? (Closed)" href="https://bugs.ruby-lang.org/issues/2223">#2223</a>.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a><br>
=end</p> Ruby master - Bug #3352: Delegates: protected methodshttps://bugs.ruby-lang.org/issues/3352?journal_id=113772010-05-30T22:06:23Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>=begin<br>
Hi,</p>
<p>2010/5/30 Marc-Andre Lafortune <a href="mailto:ruby-core-mailing-list@marc-andre.ca" class="email">ruby-core-mailing-list@marc-andre.ca</a>:</p>
<blockquote>
<blockquote>
<p>And, Marc-Andre, please take a look at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: lib/delegate: security model? (Closed)" href="https://bugs.ruby-lang.org/issues/2223">#2223</a>.</p>
</blockquote>
<p>Yes. This came up while working on the specs for that issue. Which<br>
also means you were right that my patch there should not use<br>
#public_methods</p>
</blockquote>
<p>Aha! All right.</p>
<blockquote>
<p>Last question: should the delegate object's protected method show up<br>
in protected_methods (as was "intended"), or in public_methods (as is<br>
in effect)?</p>
<p>I'd lean on listing it in protected_methods</p>
</blockquote>
<p>I agree with you.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p>
<p>=end</p>