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
path: root/lib
diff options
context:
space:
mode:
authordrew cimino <dcimino@gitlab.com>2019-06-14 23:25:02 +0300
committerdrew cimino <dcimino@gitlab.com>2019-06-15 00:58:42 +0300
commit396348dd175d70f9cb547f1e037a9b303e1a93aa (patch)
tree047f658d7224cc32c897df1469d06c2f3f40b8a8 /lib
parentad722a4e1f588382f5c5c1848c0502864993c7e7 (diff)
Return boolean from Lexeme::Matches#evaluate
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/pipeline/expression/lexeme/matches.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/gitlab/ci/pipeline/expression/lexeme/matches.rb b/lib/gitlab/ci/pipeline/expression/lexeme/matches.rb
index d7f47c0e7e6..942e4e55323 100644
--- a/lib/gitlab/ci/pipeline/expression/lexeme/matches.rb
+++ b/lib/gitlab/ci/pipeline/expression/lexeme/matches.rb
@@ -13,16 +13,6 @@ module Gitlab
regexp = @right.evaluate(variables)
regexp.scan(text.to_s).any?
-
- if ci_variables_complex_expressions?
- # return offset of first match, or nil if no matches
- if match = regexp.scan(text.to_s).first
- text.to_s.index(match)
- end
- else
- # return true or false
- regexp.scan(text.to_s).any?
- end
end
def self.build(_value, behind, ahead)
@@ -32,12 +22,6 @@ module Gitlab
def self.precedence
10 # See: https://ruby-doc.org/core-2.5.0/doc/syntax/precedence_rdoc.html
end
-
- private
-
- def ci_variables_complex_expressions?
- Feature.enabled?(:ci_variables_complex_expressions)
- end
end
end
end