From: Brad Date: 2004-02-09T10:39:28+09:00 Subject: Re: Silly question Gavin Sinclair wrote: > On Tuesday, February 3, 2004, 1:19:57 AM, Brad wrote: > > > All: > > > This may be mentioned somewhere, but I have yet to see an explanation > > of what the difference between: > > > Class#method > > > and > > > Class.method > > > is in the documentation. > > > Class#instance_method (Array#size) > > Class.class_method (Regexp.escape) > > Class methods are really just singleton methods on a class object. > That's why I prefer Class.method notation to Class::method, which is > also allowed. > > Class#method is a documentation convention only; the language does not > recognise it. > > Cheers, > Gavin > > > Gavin: Hey thanks for the reply! I kind of figured that the use of '#' between a class and a method was only a documentation convention. But it wasn't clear what the notation was used to mean. i.e. both # and . were used, but without explanation of the difference. :) It's been mentioned that the use of # signifies an instance method and the use of . signifies a class method. (Thanks to Dan Doel for this explanation) Though, as Dan said, it's unclear if this is the actual difference between the two symbols. Thanks, Brad