Ruby - Inheritance
What will be the output of this Ruby code?
class Person
protected
def secret
"protected info"
end
public
def reveal_secret(other)
other.secret
end
end
p1 = Person.new
p2 = Person.new
puts p1.reveal_secret(p2)