I believe this commit, which changed from prepend to extend, broke the conditional support. I noticed this when trying to upgrade jsonapi_compliable - my if procs no longer get called, which broke extra_fields support.
The expectation is that I will get this overridden #requested_attributes, but debugging the code I see this is never called. The original #requested_attributes method is called.
I'm not sure how specs are passing, because this script mimics the same pattern and illustrates the problem:
classFoodefbar'original bar'endendmoduleMixdefself.extended(klass)klass.class_evaldoincludeInstanceMethodsendendmoduleInstanceMethodsdefbar'overridden bar'endendendFoo.extendMixputsFoo.new.bar#=> 'original'
I believe this commit, which changed from
prependtoextend, broke the conditional support. I noticed this when trying to upgrade jsonapi_compliable - myifprocs no longer get called, which brokeextra_fieldssupport.The expectation is that I will get this overridden #requested_attributes, but debugging the code I see this is never called. The original #requested_attributes method is called.
I'm not sure how specs are passing, because this script mimics the same pattern and illustrates the problem: