From: Brian Candler Date: 2010-10-01T19:00:57+09:00 Subject: Re: How to prevent overwriting methods by accident? Jes炭s Gabriel y Gal叩n wrote: > Shouldn't we be using respond_to? instead of method_defined? or > methods.include?. respond_to? only works on instances of objects, not when you're within the class. You could do "new.respond_to? ..." but if the initialize method needs arguments, you'll have to provide them. -- Posted via http://www.ruby-forum.com/.