On Thu, Oct 03, 2002 at 01:46:37AM +0900, Kontra, Gergely wrote:
> Hi!
> 
> I've noticed some bugs in ruby (I expect another results)
> 
> I tested it under Ruby172-4.exe (downloaded from thePragmaticProgrammer
> page), winME
> 
> k='Hello'
> [1,2,3].map {|k| k}
> puts k
> 
> It prints 3 under ruby1!
Correct.

 
> Another one:
> 
> def a
>   b=2
> end
> 
> a()
> puts b
> 
> prints 2
Also correct.
Remember that variables in Ruby has no 'local' context.

-- 
/ Alexander Bokovoy
---
Q:	How do you save a drowning lawyer?
A:	Throw him a rock.