diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-04 09:09:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-04 09:09:18 +0300 |
commit | 042ccd2b3d03ec20764abfa73028d65e46c9b152 (patch) | |
tree | 559f4177999ea1237421f7985495ece8becb18e0 /lib/gitlab/utils | |
parent | 96b9c71d17edf4607bc0bee62375dfd7266642aa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/utils')
-rw-r--r-- | lib/gitlab/utils/delegator_override/validator.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/utils/delegator_override/validator.rb b/lib/gitlab/utils/delegator_override/validator.rb index 402154b41c2..4449fa75877 100644 --- a/lib/gitlab/utils/delegator_override/validator.rb +++ b/lib/gitlab/utils/delegator_override/validator.rb @@ -28,7 +28,13 @@ module Gitlab end def add_target(target_class) - @target_classes << target_class if target_class + return unless target_class + + @target_classes << target_class + + # Also include all descendants inheriting from the target, + # to make sure we catch methods that are only defined in some of them. + @target_classes += target_class.descendants end # This will make sure allowlist we put into ancestors are all included |