From: ahoward Date: 2003-01-30T03:27:39+09:00 Subject: Re: Local variables & blocks On Thu, 30 Jan 2003, Yukihiro Matsumoto wrote: > It does. The key is: > > * no other way to make block local variables > > So that x in > > a.each do |item| > x = ... > end > p x > > would not be a block local variable. The code above will work without > preceding "nil" assignment. o.k. i understand. wouldn't that break backward compatibility since any code like x = 'something completely unrelated' .... # 1000 lines of code .... block_method do |arg| x = 42 end would clobber the previous x? -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================