From: Eric Hodel Date: 2006-09-21T15:00:18+09:00 Subject: Re: the point of omitting parentheses On Sep 20, 2006, at 9:00 AM, Henrik Schmidt wrote: > Phrogz wrote: >> Would you really type: >> class Foo >> attr_accessor( :bar ) >> end > > Yes, I would and I'll tell you why. attr_accessor is a method call. > Vincent Fourmond mentioned alias, which isn't, but how would I know > that? Because it gives you a syntax error if you try to write it like a method call. > For example: > > class Foo > attr_accessor :foo, :bar > alias :baz, :foo > end > > I would expect this to be syntactically correct. It isn't, though. > alias is a keyword that seems to be syntactic sugar for alias_method > (:baz,:foo) alias came first, alias_method later. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com