From: Minero Aoki Date: 2001-07-31T12:02:22+09:00 Subject: [ruby-talk:18857] Re: Get a list of class (not instance) functions In mail "[ruby-talk:18837] Re: Get a list of class (not instance) functions" "Florian G. Pflug" wrote: > > (class << some_class; self end).instance_methods > > It works.... but I'm not sure that I understand why. Please tell me if my > assumptions are correct. You are almostly right. Things are documented at "Ruby's Class Hierarchy Chart" in object.c. (Source code is a document In Ruby World... :) > And why doens't Foo.class return the metaclass, just like foo.class returns > Foo? Because singleton methods are belong to object (not class), at least in ruby philosophy. Singleton class statement is the only place where metaclass appears directly. Minero Aoki