From: nobu.nokada@... Date: 2002-10-03T02:07:54+09:00 Subject: Re: bugs Hi, At Thu, 3 Oct 2002 01:46:37 +0900, Kontra, Gergely wrote: > k='Hello' > [1,2,3].map {|k| k} > puts k > > It prints 3 under ruby1! Yes, using block argument equals to assignment to it. > Another one: > > def a > b=2 > end > > a() > puts b > > prints 2 Really? I got this error: -:6: undefined local variable or method `b' for # (NameError) > I don't see the point why split returns an empty array, when it has a > *VALID*, but empty input string. It should return an array returning one > empty element, so ['']. ''.split('-', -1) # => [''] -- Nobu Nakada