天天看点

得到singleton类?

singletonclass=class<<test;self;end

对于对象,也是如此:

test=test.new

metaclass=class<<test;self;end

文章转自庄周梦蝶  ,原文发布时间 2007-10-31