From: Robert Klemme Date: 2004-06-09T16:38:42+09:00 Subject: Re: question about private method "wang" schrieb im Newsbeitrag news:dc1b9b9.0406081833.6228ed2e@posting.google.com... > 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? I think, this way enforcing the privacy is made easier (for the implementor of the runtime). Different question: Why would you need to call it like this? Regards robert > > 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)