From: Thomas Sondergaard Date: 2002-03-18T04:27:25+09:00 Subject: Re: instance_respond_to? Eek, ignore my last post. All I had to do was call public_instance_methods(true) instead of just public_instance_methods() to get the methods defined in superclasses. I'll stop the spamming right away :-) Thomas On Sun, 2002-03-17 at 20:24, Thomas Sondergaard wrote: > > For now I will add it myself. Shouldn't the following do fine? > > > > class Module > > def instance_respond_to? aSymbol > > return public_instance_methods.include?(aSymbol.to_s) > > end > > end > > (I removed Module. above in return public_instance_blahblah) > > I'll answer my own question: Nope, it wont because > public_instance_methods only returns the methods defined in the > class/module itself not in its superclasses. > > Is there a way to do this? > > Thomas