From: Robert Klemme Date: 2009-06-23T07:55:26+09:00 Subject: Re: Are methods objects? On 22.06.2009 22:40, Marc Heiler wrote: > Before someone showed me > method(:puts).class > I thought methods are no objects. > > But class Method seems to exist, with > Method.class giving back Class, > so > Method.class.new > would be the same as > Class.new > > I guess one can extend every Class.new via > instance_eval, but my problem here fundamentally is, > why is a method an object? And if I can create a > new object from any method... You can't just create a new object from any method. "Method.class.new" works for all other classes as well because, as you have clearly seen, "Method.class" returns "Class". "Class.new" in turn creates a new object - but it's a class object! To get an instance you would have to do "Class.new.new". :-) For the other questions please see David's excellent explanation. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/