From: "Joe Wölfel" Date: 2008-10-01T22:59:09+09:00 Subject: Re: ruby1.9 block scope On 1 oct. 08, at 04:18, Brian Candler wrote: > Nobuyoshi Nakada wrote: >> How about making all local variables other than block arguments >> method/class/toplevel? > > On the plus side: > > def my_find(a) > # res=nil not needed! > a.each { |e| res = e if e =~ /foo/ } > res > end res = a.find { |e| e =~ /foo/ }