>> >> 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 is an issue discussed previously on this list as well as feature 
>enhancements to Ruby in future versions if I am not mistaken.  In the above 
>code k is defined outside the code block and that is why it's assignment 
>within the code block is retained outside of it.

So it won't change in the future?

Gergo


+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
|         Email: kgergely / mcl.hu,  kgergely / turul.eet.bme.hu          |
|  URL:   turul.eet.bme.hu/~kgergely    Mobile: (+36 20) 356 9656     |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net