From: "David A. Black" Date: 2005-01-22T22:04:53+09:00 Subject: Re: Refernce objects Hi -- On Sat, 22 Jan 2005, Jacob Fugal wrote: > 2) An empty parameter list is usually unnecessary, thus you can both > define and call cached_instances without needing the '()'. Attaching > an empty parameter list differs from no parameter list in only two > cases I can think of; a) super vs. super() and b) disambiguating > between a local variable and method of the same name (this may not > even be an issue). You can use them that way: irb(main):003:0> def x; 1; end; x = 2 => 2 irb(main):004:0> x => 2 irb(main):005:0> x() => 1 though just making the receiver explicit (self) is fine too. Other than those cases I can't think of any time you'd need empty parens. Everything after the dot is automatically a method call, so the parens don't convey any new information. David -- David A. Black dblack@wobblini.net