From: gabriele renzi Date: 2002-12-06T21:39:43+09:00 Subject: Re: method not from ancestor On Thu, 5 Dec 2002 08:32:54 +0900, Shannon Fang wrote: >Hi, > >When I use the #methods call to find out what method a class/object >support, it reports methods from all ancestors. This is right, but how >can I tell if a method is defined in this class, or from its ancestor? > >I am thinking of using the & operator of array, but it gives the common >part of 2 sets, how can we find out the difference part? Is there a >simpler way to acomplish this simple task? > >Tks. >Shannon > Hi, you could even use - Class.instance_methods that gives you the methods in the object - Class.singleton_methods to get the Class specific methods Hope I helped >