A private method cannot be called with an explicit receiver -- even
self -- except when calling a private setter method, because otherwise
an assignment to a local variable will be assumed.
For example:
-----------------------
class Q
def a1
@p = nil
self.p=(3)
@p
end
def a2
@p = nil
p=(3)
@p
end
private
def p=(obj)
@p = obj
end
end
-----------------------
CONSOLE
>> Q.new.a1
=> 3
>> Q.new.a2
=> nil
-----------------------
Since there is already this exception to the rule, why not allow
explicitly using self for ALL private methods? What harm can be done?