6
我有這樣塊和對象
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
。這是正確的行爲,並且圍繞着它嗎?
你不需要這種行爲嗎? – 2012-02-01 17:51:54
就我而言,不,我不知道。 – NebulaFox 2012-02-01 18:11:53