From: Christopher Dicely Date: 2009-04-16T08:49:03+09:00 Subject: Re: Proc.call with custom bindings On Wed, Apr 15, 2009 at 3:17 AM, Brian Candler wrote: > > There has been no (potential) assignment to y lexically before the puts > statement, and therefore it is statically decided that y must be a > method call, i.e. self.y() > > This logic may be a little surprising at first, but it means that you > don't have to declare variables, and it also means you don't have to > provide an empty set of parentheses when invoking a method which takes > no arguments. Well, discussing the issue of determining whether it is a local variable or method statically at parse time vs. dynamically at run time, what it means is not so much that but "Ruby runs some amount faster than it would with dynamic determination". You don't need the static resolution of method/local variable ambiguity to avoid empty parens or variable declarations, but static resolution at parse time makes it quicker than it would be if it was dynamically resolved at run time.