[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:02045] Re: Anonymous and Singleton Classes

From: matz@... (Yukihiro Matsumoto)
Date: 2000-03-21 04:01:21 UTC
List: ruby-talk #2045
Hi,

In message "[ruby-talk:02036] Anonymous and Singleton Classes"
    on 00/03/20, B_DAVISON <Bob.Davison@reuters.com> 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.

In This Thread