Freeze the constant array

This commit is contained in:
Lin Jen-Shin 2017-10-02 14:45:58 +08:00
parent 9401c137fd
commit e9ffa33951

View file

@ -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)