From: "NARUSE, Yui" Date: 2010-07-15T15:45:33+09:00 Subject: [ruby-core:31295] Re: [Bug #3562] regression in respond_to? Hi, 2010/7/15 Marc-Andre Lafortune : > Hi, > > On Tue, Jul 13, 2010 at 11:35 PM, NARUSE, Yui wrote: >> So I want revert this change to ease maintaining RubySpec. > > RubySpec is already fixed, with the exception of lib/delegate; I'm > waiting for decisions to be made to ask wether delegates should > forward protected methods or not (and thus change the specs & lib > accordingly). I'm talking about that two failures. > I am not saying to revert it or not, just that maintaining RubySpec is > not a problem. > > It's quite unfortunate that no decision was made in time for 1.9.2. It is needless to say that it won't merged in 1.9.2 because of feature freeze. > Did we consider adding a warning in 1.9.2 if respond_to(:foo, false) > is called for a protected method :foo? > > Another solution would be to revert the change and introduce > `respond_to_public?`. If the flag of respond_to? defaulted back to > true, then neither `send(:foo) if respond_to?(:foo)` nor > `send_public(:bar) if respond_to_public?(:bar)` would raise a > NoMethodError. > > I'll adapt RubySpec when a decision is made; I also understood that > the change was for 1.9.3 and coded accordingly. Matz says the change won't be in 1.9.3 but 2.0 in [ruby-core:31244]. -- NARUSE, Yui naruse@airemix.jp