From: Pit Capitain Date: 2004-11-24T06:31:18+09:00 Subject: Re: Question about the behavior of reopening a module and including another module. Zev Blut schrieb: > Recently a colleague and I discovered that our understanding of how > modules work, with regards to reopening a module after being included > in a class, seems to be at odds with how Ruby actually handles the > situation. > > (example snipped) > > Is this a design decision or an implementation issue? You can find a description here: http://www.ruby-doc.org/docs/ProgrammingRuby/html/classes.html#UC (if you have the paper version see also figure 19.4 on page 247). By including a module, anonymous proxy classes pointing to the module and its ancestors are added to the ancestors of the including class. If you alter a module's ancestors AFTER including the module in a class, the proxy classes don't reflect this change. I think it's an implementation issue. Regards, Pit