I read Ruby U.'s Guide http://www.rubyist.net/~slagell/ruby/
created by Yukihiro M.
and i have a question about access control.
Access Control section explain method following code.
- def square(n)*
|* n * n*
Object class has square method.
But it is not allowed access of square method following document.
We are not allowed to explicitly apply the method to an object:
ERR: (eval):1: private method `square’ called for “fish”:String
But it is operated when i write code above in ruby 1.8.7
What is the matter ?
wrong document ?