Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-04 09:09:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-04 09:09:18 +0300
commit042ccd2b3d03ec20764abfa73028d65e46c9b152 (patch)
tree559f4177999ea1237421f7985495ece8becb18e0 /lib/gitlab/utils
parent96b9c71d17edf4607bc0bee62375dfd7266642aa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/utils')
-rw-r--r--lib/gitlab/utils/delegator_override/validator.rb8
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