summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hanreich <stefanhani@gmail.com>2017-05-11 20:14:15 +0200
committerStefan Hanreich <stefanhani@gmail.com>2017-06-18 23:57:22 +0200
commit5fc22bfabd619115c1df28d30a951084508b28ed (patch)
treeafca00d2e0200f0249f1603a1af0c2e54269243a
parente02ca5fdb7f9b9a7e52d0e6edfb3be65860818a5 (diff)
downloadgitlab-ce-5fc22bfabd619115c1df28d30a951084508b28ed.tar.gz
updated regex to use beginning / ending of string metacharacters
-rw-r--r--app/models/ci/build.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index f190dcf306c..58bd0586ce8 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -191,7 +191,7 @@ module Ci
def ref_slug
slugified = ref.to_s.downcase
slugified = slugified.gsub(/[^a-z0-9]/, '-')[0..62]
- slugified.gsub(/(^\-+|\-+$)/, '')
+ slugified.gsub(/(\A-+|-+\z)/, '')
end
# Variables whose value does not depend on other variables