From: matz@... (Yukihiro Matsumoto) Date: 2002-01-13T00:47:25+09:00 Subject: Re: respond_to? and public/private Hi, In message "respond_to? and public/private" on 02/01/11, Johan Holmberg writes: |I think the default value of that parameter is a bit unintuitive. |Wouldn't it be better if the default was depending on the call |context ?, ie. that | | ......respond_to? :foo...... | |told if | | ......foo(arguments)...... | |would succeed in finding a callable function/method. Do you mean respond_to? :foo reports including private methods, and obj.respond_to? :foo reports only public methods? What about "protected"? How about using "defined?" without complicating "respond_to?" behavior? defined? print # => "method" defined? self.print # => nil matz.