From: Ned Konz Date: 2001-08-19T03:13:11+09:00 Subject: [ruby-talk:19981] Re: How to do arbitrary super calls? On Saturday 18 August 2001 10:53 am, Dave Thomas wrote: > class B < A > alias :super_a :a Ah, thanks! > > This is a pattern that comes up from time to time. > > I'm trying to think when I'd see this and not think to myself: there's > something wrong here. I've had situations where I wanted the code re-use. One place where I've used this is where a subclass implements its own #initialize , but also provides a separate #initializeFrom: method; both may want to call the superclass #initialize to get the superclass instance variables initialized, but #initializeFrom: may not want to call #initialize . Where I've had to do this is when I'm using a framework where I can't just refactor the existing code (because I didn't write the framework, and because then when a new version came out I'd have to track down all of my changes to the framework). If it was all my code, I'd refactor it, of course. But it's not always mine. -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://bike-nomad.com