[Pharo-project] Issue 3957 in pharo: MethodWrappers left method after uninstall

pharo at googlecode.com pharo at googlecode.com
Mon Apr 4 20:00:28 CEST 2011

Comment #1 on issue 3957 by marianopeck: MethodWrappers left method after  

Thinking about that, I think that's a bug. I mean, you want to install the  
wrapper in the class Foo. For me, it should not follow the lookup. It  
should do just a

oldMethod := self wrappedClass methodDict at: self selector

which will throw an error if the selector is not defined in the class.

I think that doing the lookup can be dangerous. Maybe adding another method  

ObjectAsMethodWrapper onClassOrSuperclasses: Foo selector: #hash

that does what is now...

what do you think ?

More information about the Pharo-project mailing list