我有以下类在我的开发环境中正常工作:
module LeadCapturer
class LeadPartArray < DelegateClass(Array)
def <<(part, &block)
super(part) unless ((@arr.select{|p| p.text == part.text}.size > 0) || (part.text.strip.size == 0))
end
def initialize(arr = [])
@arr = arr
super(@arr)
end
end
end
但在制作中我收到以下错误:
lead_part_array.rb:2: superclass mismatch for class LeadPartArray (TypeError)
有谁知道为什么会这样?