2007/11/2, Yukihiro Matsumoto <matz / ruby-lang.org>: > Hi, > > In message "Re: Get only the non-inherited methods of a class" > on Fri, 2 Nov 2007 21:05:57 +0900, Max Williams <toastkid.williams / gmail.com> writes: > > |Does anyone know how to get the methods of a class in such a way as to > |*not* get inherited ones? > > Giving false to #methods. > > Stringh.methods > => ["inspect", "send", "class_eval",... > String.methods(false) > => [] I guess when invoked on the class instance then it should probably be String.instance_methods and String.instance_methods(false). If invoked on the instance then methods and methods(false) should be appropriate. Kind regards robert -- use.inject do |as, often| as.you_can - without end