ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: Difference between define_method and def method; end
by Robert Dober other posts by this author
Nov 1 2006 9:06AM messages near this date
Re: Difference between define_method and def method; end | Re: Difference between define_method and def method; end
On 11/1/06, Rune Hammersland <rune@[...].com>  wrote:
> 
>  Robert Dober wrote:
>  > On 10/31/06, ara.t.howard@[...].gov <ara.t.howard@[...].gov> wrote:
>  >    <Ara's version of code snipped>
>  >>      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
<SNIP> 

>  --
>  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
Thread:
Rune Hammersland
Ara T Howard
Robert Dober
Ara T Howard
Rune Hammersland
Robert Dober
Rune Hammersland
Rune Hammersland
Timothy Goddard

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved