summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStefan Hanreich <stefanhani@gmail.com>2017-05-11 21:59:05 +0200
committerStefan Hanreich <stefanhani@gmail.com>2017-06-18 23:57:22 +0200
commit935578b4ab6d49caa516a1c96b9bfd80f7358c74 (patch)
tree66640bf9a75f5946148bce8f9c27a29c59060798 /app
parentd60a59b067f7914ddcd7d28300f025cf125b586d (diff)
downloadgitlab-ce-935578b4ab6d49caa516a1c96b9bfd80f7358c74.tar.gz
using bang method for gsub
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 58bd0586ce8..ffe8f5a28ae 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -190,8 +190,8 @@ module Ci
# * First/Last Character is not a hyphen
def ref_slug
slugified = ref.to_s.downcase
- slugified = slugified.gsub(/[^a-z0-9]/, '-')[0..62]
- slugified.gsub(/(\A-+|-+\z)/, '')
+ slugified.gsub!(/[^a-z0-9]/, '-')
+ slugified[0..62].gsub(/(\A-+|-+\z)/, '')
end
# Variables whose value does not depend on other variables