From: Jonas Pfenniger Date: 2006-07-12T02:28:03+09:00 Subject: Re: module private methods inheritance ? On 11/07/06, transfire@gmail.com wrote: > This code essentially (or at least partially succeeds at) reversing the > inclusion order of two modules. Ie. > > module B; end > module A; include B; end > > becomes > > module B; include A; end exactly > Are you sure you want to do that? That can have crazy effects! In fact > it's a very bad idea unless you have full control coding over these > modules, and if that's the case you wouldn't need to do it anyway. So > as I say, I'm highly suspect. Looking at exacly what this does it > appears that: > > A.insert(B) > > translates into > > Bp = B.dup > > module Bp > include A > end > > remove_const A > A = Bp > > Why do you need this? Yeah I know it is stange but this is because of Camping ! I can't change the Camping code so I need to find ways to sneak myself in :-) -- Cheers, zimbatm http://zimbatm.oree.ch