我有一个像这样的对象
class SomeObject
def initialize &block
# do something
end
end
class AnotherObject < SomeObject
def initalize &block
super
# do something with block
end
end
当super
被调用时AnotherObject
,该块似乎被传递给SomeObject
. 这是正确的行为吗?它是否存在?