DEV: prevent already initialized constant warning

DEV: prevent already initialized constant warning

diff --git a/lib/discourse.rb b/lib/discourse.rb
index 2c2d8a8..a35a04d 100644
--- a/lib/discourse.rb
+++ b/lib/discourse.rb
@@ -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')

GitHub sha: c5c5bb4f