Actions
Bug #12216
closedClass inherited Singleton method exclude argument from protected method accessing
Bug #12216:
Class inherited Singleton method exclude argument from protected method accessing
Description
Dear Ruby Lang developers.
I would like to ask about why the following code can work?
Or is it a valid scenario and "as expected" behavior to ignore public call on a protected method.
Thank you guys for the brilliant!
class A
class << self
def inherited(klass)
p klass.protected_method_call
end
protected
def protected_method_call
self.to_s
end
end
end
class B < A
end
# output: "B"
Actions