From: Trans Date: 2008-04-08T02:37:30+09:00 Subject: Re: ruby wish-list On Apr 7, 1:01 pm, Roger Pack wrote: > > If I wanted something "intuitive", > > > /* > > I'd probably prefer something like this, > > */ > > Yeah that'd be sweet. > > I believe this next wish has been mentioned before, but... > I wish you could call functions with the same name from arbitrary > ancestor classes. > > class A > def run > print 'A' > end > end > class B < A > def run > print 'B' > end > end > > test = B.new > test.run # prints B > test.class.run_as(A).run # prints 'A' See Facets Kernel#as. http://facets.rubyforge.org T.