From: matz@... (Yukihiro Matsumoto) Date: 2003-02-05T04:42:55+09:00 Subject: Re: Local variables & blocks Hi, In message "Re: Local variables & blocks" on 03/02/05, Brian Candler writes: |(1) Matz wants a compulsory warning here: | | foo = 0 | [1,2,3].each { |foo| # << HERE | .. | } | |Myself, and several others on this list, feel that this warning should be |optional. It's not really necessary at all, unless you're concerned about |making your scripts run on earlier versions of Ruby. But I still hate shadowing, strong enough to raise warning. |(2) I asked for a warning (optional, with -w) if a local variable is |assigned but not used. Examples would be: Nobu once made a patch for this. I didn't merge it because it's little bit ugly in the current implementation. But I like the idea. I will definitely add this check in the future release. matz.