From: Brian Candler Date: 2003-02-05T04:33:08+09:00 Subject: Re: Local variables & blocks On Tue, Feb 04, 2003 at 07:28:26PM +0000, Brian Candler wrote: > This request can be considered entirely separately from the block-scoping > issue. It would incidentally catch a few perverse cases, for example > > i = 0 > ... > [1,2,3].each { |i| > i = 7 # << HERE, this value is never retrieved > } Oh and just to be clear, I'm not asking for any sort of data-flow analysis; just a trivial check that at least one access has been made. [1,2,3].each { |i| puts i # value of 'i' is used (usage count > 0) i = 7 # so no warning here } Regards, Brian.