From: wwayya2004@... (wang) Date: 2004-06-10T19:13:46+09:00 Subject: Re: question about private method wwayya2004@hotmail.com (wang) wrote in message news:... > In ruby FAQ : > The visibility keyword private makes a method callable only in a > function form, and so it can only have self as a receiver. > But,why i can't write like below? > > class Test > def func > self.test #use self > end > > private > def test > p "test" > end > end > > t=Test.new > t.func >>in `func': private method `test' called for > #NoMethodError) Thanks all! Maybe i wasn't express my thought clearly. I read "...it can only have self as a receiver..." in FAQ, so i call "test" with "self" but wrong. What the really mean of "self" in FAQ?