Gavin Kistner
9/2/2006 4:23:00 AM
Hal Fulton wrote:
> class Pathname
> alias / +
> end
I like this, both because it's element, AND because I'm not sure I've
ever seen alias before. #alias_method, yes, but not that. I was about
to reply "I think you mean 'alias_method :/, :+'", and was surprised to
find that what you wrote worked as advertised.
So...'alias' isn't a method? It's a reserved keyword that's part of the
syntax? And it's "parameters" can be raw method or operator names
instead of strings or symbols? (I'm looking at the section on
"Aliasing" in Pickaxe II, but it's still not telling me /what/ 'alias'
is. Or how it differs from #alias_method.)