From e9ffa3395127618add901b9fc16117fb88c26b21 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Mon, 2 Oct 2017 14:45:58 +0800 Subject: [PATCH] Freeze the constant array --- lib/gitlab/url_sanitizer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb index 9931abe8a6e..1caa791c1be 100644 --- a/lib/gitlab/url_sanitizer.rb +++ b/lib/gitlab/url_sanitizer.rb @@ -1,6 +1,6 @@ module Gitlab class UrlSanitizer - ALLOWED_SCHEMES = %w[http https ssh git] + ALLOWED_SCHEMES = %w[http https ssh git].freeze def self.sanitize(content) regexp = URI::Parser.new.make_regexp(ALLOWED_SCHEMES)