From: Tobias Nurmiranta Date: 2004-04-15T23:56:59+09:00 Subject: Re: Class#method (Was: Re: [bug] Array#fetch weird second argument) On Thu, 15 Apr 2004, Tim Sutherland wrote: > In article , Tobias > Nurmiranta wrote: > >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'. Hmm, maybe it wasn't so thought through :). It will probably just confuse with semantics like this: class C def f() 3 end def C.g() 4 end end x = C.new y = x#f # same as x.method(:f) y.call => 3 a = C#g # same as C.method(:g) a.call => 4 Ehm, well forget it. :) , Tobias