From: "Thomas B." Date: 2008-09-18T06:07:29+09:00 Subject: Re: Singleton class's original class Paul Brannan wrote: > How can I get class that the singleton class is a singleton class of? In general, an eigenclass (or singleton class) can be an eigenclass of anything, and not only of a class. It can be like this: class<<"asd";self;end. > irb(main):013:0> ObjectSpace.each_object(Class) { |c| break c if > c.singleton_class == sc } > => Foo Why complicate? a=anything ec=class< true The object space will call the block only once. TPR. -- Posted via http://www.ruby-forum.com/.