From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-06-26T06:07:31+09:00 Subject: Re: protect parents from children On Wed, 25 Jun 2003 21:45:12 +0000, Martin DeMello wrote: > Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> wrote: >> On Wed, 25 Jun 2003 14:22:56 +0000, Martin DeMello wrote: > >>> And don't forget they can simply reopen A and add a method of their own, >>> then call it from B. >> >> I consider 'reopen'ing as a kind of subclassing. if subclass then its >> readonly mode :-) > > I seriously doubt you can write a Ruby program capable of distinguishing > between [snip} > In fact, if there weren't so many ingenious people on the list, I'd go > ahead and flatly say it was impossible :) Well, reopening is a grey area... not strictly important to me. What is *most* interesting for me, is if you such protection works with inheritance. But I doubt its possible, when reading this thread. Again if there is any experts, who know something we others dont, then say something :-) -- Simon Strandgaard