From: matz@... (Yukihiro Matsumoto) Date: 2000-03-21T13:01:21+09:00 Subject: [ruby-talk:02045] Re: Anonymous and Singleton Classes Hi, In message "[ruby-talk:02036] Anonymous and Singleton Classes" on 00/03/20, B_DAVISON writes: |I am a Ruby newbie and having some problems getting my mind around certain |aspects of classes, especially anonymous classes and singleton classes. | |I composed a nice long mail to you all then realised that I should check the |mail archive first and found the February thread "Singleton Classes". Now I am |even more confused! | |I had just decided that class << obj; ...; end didn't actually create an |anonymous class (even though FAQ 6.6 says it does) and then matz says that it |does. Two points: (a) `Class::new' should call `inherited' because it creates new anonymous subclass. It's a bug. (b) In current implementation singleton class statement creates internal class, but it is just a virtual class, so that `inherited' is not called for them. I consder it a feature. matz.