[#4567] Re: What's the biggest Ruby development? — Aleksi Niemel<aleksi.niemela@...>

Dave said:

18 messages 2000/08/23
[#4568] Q's on Marshal — Robert Feldt <feldt@...> 2000/08/23

[#4580] RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/25

[#4584] Re: RubyUnit testcase run for different init params? — Dave Thomas <Dave@...> 2000/08/25

Robert Feldt <feldt@ce.chalmers.se> writes:

[#4623] Re: RubyUnit testcase run for different init params? — Robert Feldt <feldt@...> 2000/08/28

On Sat, 26 Aug 2000, Dave Thomas wrote:

[#4652] Andy and Dave's European Tour 2000 — Dave Thomas <Dave@...>

24 messages 2000/08/30
[#4653] Re: Andy and Dave's European Tour 2000 — matz@... (Yukihiro Matsumoto) 2000/08/30

Hi,

[#4657] Ruby tutorials for newbie — Kevin Liang <kevin@...> 2000/08/30

Hi,

[ruby-talk:04397] Re: Scope surprise

From: matz@... (Yukihiro Matsumoto)
Date: 2000-08-10 00:58:16 UTC
List: ruby-talk #4397
Hi,

In message "[ruby-talk:04388] Scope surprise"
    on 00/08/09, Aleksi Niemel<aleksi.niemela@cinnober.com> 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.

In This Thread

Prev Next