From: Jason Roelofs Date: 2007-11-08T02:23:16+09:00 Subject: Re: :: and . ------=_Part_24094_32412147.1194456197945 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline They don't both always give the same result. "." is the message operator and "::" is the scoping operator. In the case of methods, they both work the same, but in the case of constants, you will get an "undefined method "CONSTANT"" if you use ".". So explicit scoping / getting nested constants, you have to use :: For class methods, you can use either. I prefer "." Jason On 11/7/07, joey eisma wrote: > > hi! > > reading through some tutorial, i noticed the author would interchange > using :: and . to call methods. i see they both give the same result. > > i was wondering if there is any other difference between the two? (other > than convenience maybe?). when would you use one over the other? > > thanks! > > joey > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com ------=_Part_24094_32412147.1194456197945--