summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/ci/build.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index ffe8f5a28ae..b6bfbd8e0d2 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -189,9 +189,10 @@ module Ci
# * Maximum length is 63 bytes
# * First/Last Character is not a hyphen
def ref_slug
- slugified = ref.to_s.downcase
- slugified.gsub!(/[^a-z0-9]/, '-')
- slugified[0..62].gsub(/(\A-+|-+\z)/, '')
+ ref.to_s
+ .downcase
+ .gsub(/[^a-z0-9]/, '-')[0..62]
+ .gsub(/(\A-+|-+\z)/, '')
end
# Variables whose value does not depend on other variables