From: matz@... (Yukihiro Matsumoto) Date: 2000-08-10T09:58:16+09:00 Subject: [ruby-talk:04397] Re: Scope surprise Hi, In message "[ruby-talk:04388] Scope surprise" on 00/08/09, Aleksi Niemel� writes: |I was amazed today by this little snippet of code. The reason is probably in |the the different scoping rules of blocks and normal code, but even with |good reason, I guess this will confuse other beginners too. Yes. The internal scope by blocks is the biggest Ruby pitfall remains. Even me sometimes fall into it. But it is required for closures work effectively. Who uses closures without local variables? I'm planning to fix it in the far future (Ruby 4000?). But unfortunately the fix would introduce non trivial backward incompatibility and complex rules for local variables. Hmm. matz.