From: timsuth@... (Tim Sutherland) Date: 2004-04-15T20:14:19+09:00 Subject: Re: Class#method (Was: Re: [bug] Array#fetch weird second argument) In article , Tobias Nurmiranta wrote: >Hi, > >I often see the SmallTalkish syntax Class#method in texts in this forum, >as the subject in this mail. Wouldn't it be nice if it was part of the >Ruby syntax as well, not just the "discussion syntax". So instead of >method(:foo) you could write Class#foo or self#foo, or maybe even #foo. > >But since the "#" is used for comments, it might get a bit ambigious. ^_^ >, Tobias Class#foo means an instance method `foo' of the class `Class'. class Foo def foo end end You propose `Foo#foo' would be the same as `Foo.method(:foo)'. But the latter does not work either. What would `(Foo#foo).call' do? It needs an instance to call an instance method :-) -- Tim Sutherland 2004 SDKACM President Software Developers' Klub - the University of Auckland ACM Student Chapter http://www.sdkacm.com/