From: Csaba Henk Date: 2005-01-28T01:20:54+09:00 Subject: Re: Self and Ruby Comparisons On 2005-01-26, ts wrote: >>>>>> "C" == Csaba Henk writes: > >C> Is there a reason for being so, or just there was no reason to make one? > > module A > end > > module B > include A > end > > class C > include A, B > end > > now `uninclude B' (or `uninclude A') remove the module A or not ? Well, to fix a simple policy with which you can't go wrong is not hard. So, for example, you could only uninclude a module if other included modules don't depend on that. That is, in the above situation trying to uninclude A would raise an error. > > ruby has lost the information that A was provided by A and B I see. In this case, you are on the safe side, if you just drop A. It's a very simple, unambigouous action. Then let the user do the bookeeping, if it's necessary in some situation. > There is also : what do you do is someone write ? > > class C > uninclude Kernel > end Is there any danger to let this? You can undef all methods one by one now as well (leave "undef_method" for last :) ). If its problematic, raise an error. Csaba > > > > Guy Decoux > > > >