From: Robert Dober Date: 2006-11-02T02:05:43+09:00 Subject: Re: Difference between define_method and def method; end ------=_Part_32514_16369154.1162400739882 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 11/1/06, Rune Hammersland wrote: > > Robert Dober wrote: > > On 10/31/06, ara.t.howard@noaa.gov wrote: > > > >> harp:~ > ruby a.rb > >> LOL: superclass method `lol' disabled > > > > > > It does the same as OP's code, I really feel this is strange. > > Rune, on philiosophical grounds, I prefer the second behavior the > > super > > method being available again, can you elaborate on why you prefer the > > first? > > I don't necessarily prefer the first, I prefer them to behave the > same way. > Actually having the super method available makes more sense. I agree, I think consistent behavior would be preferable, not losing the super method seems also more POLS to me. Now after all that talk ;) Great You Came Up With This , Rune!!! ======================= Might this go away? The reason I stumbled upon this is because I'm writing about > sandboxing and > would like to explain how you can supply "safe" versions of classes > in the > sandbox by "disabling" unsafe methods (of course it doesn't help if > you can > simply redefine the method yourself, but it's a first step). When > playing > around with undef_method and remove_method I found that remove_method > only > removes method defined in the class it self (and not derived > methods), there was a thread about that, if you are interested it might pay to search the archives > -- > Vennlig Hilsen / Regards > Rune Hammersland > > -- The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw ------=_Part_32514_16369154.1162400739882--