From: nobu.nokada@... Date: 2004-11-12T22:01:08+09:00 Subject: Re: Receiving blocks in Proc? Hi, At Fri, 12 Nov 2004 19:23:27 +0900, gabriele renzi wrote in [ruby-talk:120026]: > > Well, it did just those things, IIRC. Yes, "many" was not > > correct word, but, even in bundled libraries, tests and > > samples, some codes were using the variable of the same name as > > a method. > > > sorry if I'm asking a stupid question, I know I am dumb.. but would'nt > be enough to give precedence to a method when called and to the variable > when not explicit called? > I.e. > > > a=proc {|x| 'proc' } > a # # > a() # 'proc' > a 10 # 'proc' > def a(x) p 'meth' end > a # # precedence to var, as now > a() # 'meth' precedence to meth as now > a 10 # 'meth' precedence to meth as now Yes, my patch implemented as you mentioned. But, for instance, a code in sample/test.rb: method = method(m) `method' is defined at the moment assignment expression appears, so `method()' in RHS calls that variable which is defined but not assigned yet. -- Nobu Nakada