Determining where in the inheritance chain a method is defined
Define in your .irbrc.
def Object.method_defined_where(method)
self.ancestors.detect { |a| a.methods(false).include?(method.to_s) }
end
#Usage
#File.method_defined_where('read')
#=> IO
jbarnette and bougyman in #caboose helped me get it closer to actually working. It still probably needs some tuning. Feel free to fork and tweak the gist on method_defined_where, and then comment here.