From: Julien Gaugaz Date: 2006-12-20T21:12:45+09:00 Subject: Re: ICLASS Node? Charles Thornton wrote: > I have been looking at the nodes generated for a simple program. It > seems the when you include a module, or it is included as part of a > built-in class, the node ICLASS is constructed to interface with the > Module? > > Can anyone give me a short discussion on what ICLASS is used for > or doing in this case? > > Godfather > I'm a newbie so take my answer with care. I read in The Ruby Way from Hal Fulton (2nd ed) that when a module MyMod is mixed in a class MyClass, the module is actually inserted as a *direct* superclass of MyClass. So that if you define class MyClass < MySuper include MyMod end Then at instantiation of MyClass you will actually have MyClass < MyMod and MyMod < MySuper. Julien