Hi,
In message "Re: [ruby-core:25908] [Feature #2170] Visibility Predicates forethod Objects"
on Sat, 3 Oct 2009 04:50:54 +0900, Run Paint Run Run <redmine / ruby-lang.org> writes:
|A Method object doesn't expose the wrapped method's visibility. If you have the method name as a Symbol, however, Module#*_method_defined? can be used. This seems wrong. A naż×e patch is attached to add visibility predicates to Method and UnboundMethod.
A method object represents the body (definition) of a method, where
visibility is a property of binding (name -> method body) in the
class. So, in theory, I think a method object should not have the
visibility information. Am I wrong?
matz.