From: "Hal E. Fulton" Date: 2002-10-03T08:12:06+09:00 Subject: Re: bugs ----- Original Message ----- From: "Kontra, Gergely" To: "ruby-talk ML" Sent: Wednesday, October 02, 2002 1:07 PM Subject: Re: bugs > >> k='Hello' > >> [1,2,3].map {|k| k} > >> puts k > >> > >> It prints 3 under ruby1! > > > >Yes, using block argument equals to assignment to it. > > But shouldn't it be local to the block? It may cause nice errors... > If it is available outside the block, it is a Bad Idea(tm). :) This has been discussed in probably hundreds of posts in the last 2-3 years. The range of opinions is something like this: a. It's a bug b. It's a feature c. It's an oddity d. It's too late to fix it easily e. Various combinations of the above Go do a search for "block-local"... that should turn up lots of insomnia-curing material. Hal