From 25b9cd6386b68f7d0af26d37a250055cb487c0a3 Mon Sep 17 00:00:00 2001 From: Fabio Pitino Date: Tue, 30 Jul 2019 20:25:07 +0200 Subject: Remove memoization of sanitized_source_name The method should not contribute to the state of the object --- lib/gitlab/ci/build/policy/refs.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/gitlab/ci/build/policy/refs.rb b/lib/gitlab/ci/build/policy/refs.rb index 81f96bdbb67..8fc3dd50f8a 100644 --- a/lib/gitlab/ci/build/policy/refs.rb +++ b/lib/gitlab/ci/build/policy/refs.rb @@ -67,9 +67,7 @@ module Gitlab end def sanitized_source_name(pipeline) - # TODO Memoizing this doesn't seem to make sense with - # pipelines being passed in to #satsified_by? as a param. - @sanitized_source_name ||= pipeline&.source&.delete_suffix('_event') + pipeline&.source&.delete_suffix('_event') end end end -- cgit v1.2.1