From: Nikodemus Siivola Date: 2002-04-12T22:39:55+09:00 Subject: Re: Idea for a new shorthand On Fri, 12 Apr 2002, David Alan Black wrote: > I've always thought of super as a Y-axis thing, and alias as an X-axis > thing. I'm not sure whether they can be combined into one thing, > without some loss. Here's a rather contrived example: I may have misunderstood, but I don't think Hal ment "prior" as a "super" replacement thing at all: I think he ment that instead of 1) alias an existing method with an obscure name 2) redefine the original name and inside the new method call the original with the new, obscure name you could Redifine a method and call "prior" inside the new method to access the original definition. This would be just amazingly beautiful. In your example: class Thing < String def split(*sep) puts "New split" prior(*sep) # here both super and prior would work since they refer end # to the same method end class Thing def split(*sep) line = gets if /o/.match(line) prior(*sep) else super end end end -- Nikodemus