From: Ben Schumacher Date: 2002-10-03T02:36:59+09:00 Subject: Re: bugs Alexander Bokovoy wrote: >>Another one: >> >>def a >> b=2 >>end >> >>a() >>puts b >> >>prints 2 > > Also correct. > Remember that variables in Ruby has no 'local' context. Ruby most certainly does have a 'local' context. The variable 'b' should be local to the method 'a'. When I tested this, I got an error similar to that of Nobu Nakada's: -:6: undefined local variable or method 'b' for # (NameError) Using 'ruby 1.7.2 (2002-07-02) [i386-mswin32]' on Windows 2000. Cheers, bs.