Changeset [7691320b87df04d7f956ef2f07fd623ecee2b84e] by Dan Kubb

April 8th, 2012 @ 01:10 AM

Update callback methods to call super

  • All callback methods (extended, included, inherited, etc) should call super when they execute, even if it's likely to be a noop, because you can't assume that an ancestor does not have a same-named method defined.

    There are also cases (which are a bit dubious) where core classes have been monkey patched and had these methods added, and if you don't call super then they will never execute. While I don't necessarily agree with this practice, I feel like not calling super is more wrong. If developers want to do this I need to assume they are willign to deal with the consequences.

Committed by Dan Kubb

  • M lib/dm-core/adapters/abstract_adapter.rb
  • M lib/dm-core/model.rb
  • M lib/dm-core/model/hook.rb
  • M lib/dm-core/model/property.rb
  • M lib/dm-core/model/relationship.rb
  • M lib/dm-core/property.rb
  • M lib/dm-core/query/conditions/comparison.rb
  • M lib/dm-core/query/conditions/operation.rb
  • M lib/dm-core/resource.rb
  • M lib/dm-core/spec/lib/collection_helpers.rb
  • M lib/dm-core/support/hook.rb
  • M lib/dm-core/support/local_object_space.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »