diff options
author | Stefan Hanreich <stefanhani@gmail.com> | 2017-05-11 21:59:05 +0200 |
---|---|---|
committer | Stefan Hanreich <stefanhani@gmail.com> | 2017-06-18 23:57:22 +0200 |
commit | 935578b4ab6d49caa516a1c96b9bfd80f7358c74 (patch) | |
tree | 66640bf9a75f5946148bce8f9c27a29c59060798 /app | |
parent | d60a59b067f7914ddcd7d28300f025cf125b586d (diff) | |
download | gitlab-ce-935578b4ab6d49caa516a1c96b9bfd80f7358c74.tar.gz |
using bang method for gsub
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 4 |
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 |