Yukihiro Matsumoto
11/2/2007 2:00:00 PM
Hi,
In message "Re: Get only the non-inherited methods of a class"
on Fri, 2 Nov 2007 22:29:15 +0900, Max Williams <toastkid.williams@gmail.com> writes:
|Thanks matz, but why does that return an empty array? Shouldn't it be
|
|["%", "*", "+", "<<", etc]?
|
|(actually for me it returns ["yaml_new", "yaml_tag_subclasses?"], each
|of which gives me a NoMethodError when i try to call it on a string)
I thought you want class methods of String class. If you want to get
instance_methods of a class C, call
C.instance_methods(false)
|Would you mind explaining what passing false to methods does?
It means to list methods defined in the particular class.
matz.