DEV: prevent already initialized constant warning

This commit is contained in:
Régis Hanol 2020-08-07 16:28:43 +02:00
parent 78d443ad40
commit c5c5bb4fad

View File

@ -24,7 +24,7 @@ module Discourse
end
class Utils
URI_REGEXP = URI.regexp(%w{http https})
URI_REGEXP ||= URI.regexp(%w{http https})
# Usage:
# Discourse::Utils.execute_command("pwd", chdir: 'mydirectory')