From: ara.t.howard@... Date: 2006-08-25T03:50:31+09:00 Subject: Re: do not understand this closure On Fri, 25 Aug 2006, Mauricio Fernandez wrote: >> that said, 1.9 has support for a_proc() > > This used to work: > > $ cat proc.rb > a = proc{|x| p x} > (a)(1) > > ... but doesn't anymore. > > $ ruby19 -v proc.rb > ruby 1.9.0 (2006-08-13) [i686-linux] > proc.rb:2: warning: useless use of a variable in void context > proc.rb:2: syntax error, unexpected '(', expecting $end > (a)(1) > > > Right now, it's > > RUBY_RELEASE_DATE # => "2006-08-13" > RUBY_VERSION # => "1.9.0" > a = proc{|x| x+1} > a.(2) # => 3 huh. so '()' is a method name now? -a -- to foster inner awareness, introspection, and reasoning is more efficient than meditation and prayer. - h.h. the 14th dalai lama