Hank Gong wrote:
> Hi! When I read the Ruby manual, I noticed that for class Array, there are
> class methods and instance methods.
> 
> Class methods:
> [] and new
> 
> instance methods:
> too many (not list here)
> 
> My question is: what's this class methods? I remember in C++, all methods
> should be instance level, right?


p Array.class  # Class
p Array.instance_of? Class  # true


Array is an instance of Class, so those methods are, in a way, instance 
methods.


No?


They're not eigenmethods are they?


:)



James
-- 

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com     - Playing with Better Toys
http://www.30secondrule.com   - Building Better Tools