From: Christoph Date: 2002-12-19T07:32:04+09:00 Subject: Re: Mommy, where do methods come from? wrote .... > > module Kernel > def methodClass(m) > m = "#{m}" > self.class.ancestors.find {|c| c.instance_methods.include?(m)} > end > end Here is a slightly extended version which (hopefully) allows for ``undef's" and/or singletons methods. --- module Kernel def methodClass(m) m = m.to_s # catch method undef's respond_to?(m) or return nil # meta class is first inline extended_anc = self.class.ancestors.unshift(class << self; self end) extended_anc.find {|c| c.instance_methods.include?(m) } end end --- ... /Christoph