From: Rick DeNatale Date: 2007-11-08T20:42:13+09:00 Subject: Re: Metaclasses On 11/8/07, David A. Black wrote: > It actually depends which version of Ruby you use. The superclass > thing worked as expected in 1.8.2; then it stopped working (I'm not > sure why); and in 1.9 it's working again. ("Not working" doesn't mean > that the subclasses couldn't call the methods defined in their > superclasses' singleton classes, just that the superclass thing itself > was not in place.) interesting, I didn't realize that this had changed in 1.9. Actually, it's not that anything isn't in place in 1.8, it's that the implementation of Class#superclass skips classes in the superclass chain, the same way that Object#class skips an instance singleton class if there is one, and the ancestors methods replaces the wrapper IClass nodes used to represent included modules in the behavior chain of an object into the modules themselves in the result. It's smoke and mirrors, and in the case of Ruby 1.9 it seems theres a little less smoke and mirrors in Class#superclass. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/