Why I can not call super in define_method with overloading method?

前端 未结 1 1126
说谎
说谎 2020-12-31 08:52

When I run code below it raise error:

implicit argument passing of super from method defined by define_method() is not supported. Specify all argument

相关标签:
1条回答
  • 2020-12-31 08:56

    The error message is quite descriptive. You need to explicitly pass arguments to super when you call it inside of define_method block:

    mem[args] = super(*args)
    
    0 讨论(0)
提交回复
热议问题