From: Mathieu Bouchard Date: 2001-05-15T08:14:09+09:00 Subject: [ruby-talk:15125] Re: How do I alias a class method? On Tue, 8 May 2001, Sean Russell wrote: > > possibly; but "alias" is not only a name that is different, it is not > > calling a method, it is a reserved word. Notice that there is no comma > > between the two arguments! I would guess it was created this way because > > it was the first such feature added in Ruby, but Matz should know the > > story quite exactly :-) > Doh! Ok, I assumed a typo and inserted a comma when I tried this (I had done > something earlier with alias_method, but didn't remember alias). Anyway, > which is more "proper"? Do they behave the same? Is one more efficient than > the other? If "alias" existed first, why was "alias_method" implemented and > added to core Ruby? > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > Sorry... I meant that to go to the list. :-/ There should be no visible efficiency difference. I still always use the reserved keyword "alias", but I'd also agree if it was planned to remove it in a future version. The reason is consistency. Some of us also think that this: class A < B blah end should change to: A = Class.new(B) { blah } and similar things. matju