class Example
private
def example_test
puts \'Hello\'
end
end
e = Example.new
e.example_test
This of course will not work, because we specifi
It's weird, but many things about Ruby's visibility modifiers are weird. Even if self
is the implicit receiver, actually spelling it out makes it explicit in the eyes of the Ruby runtime. When it says that private methods cannot be called with an explicit receiver, that is what it means, even self
counts.