From: Dave Thomas Date: 2001-11-01T03:55:41+09:00 Subject: [ruby-talk:24009] Re: Strangeness with undefining methods Paul Brannan writes: > In what real world situation might I use undef instead of remove_method? > And when I undef a method, where does the method go, since I can't call > it? (I've noticed that I can still call remove_method after an undef). Take the case where the method overrides an identically named method in a superclass. With undef, the superclass's method can't be called, because calling the undef'd method generates an error. With remove_method, the original method vanishes, and the superclass's method becomes visible. See the example on Pickaxe pg 352 (or at http://www.rubycentral.com/book/ref_c_module.html#undef_method) Regards Dave