File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ class InvalidModelIdError < URI::InvalidComponentError; end
36
36
COMPOSITE_MODEL_ID_MAX_SIZE = 20
37
37
COMPOSITE_MODEL_ID_DELIMITER = "/"
38
38
39
+ URI_PARSER = URI ::RFC2396_Parser . new # :nodoc:
40
+
39
41
class << self
40
42
# Validates +app+'s as URI hostnames containing only alphanumeric characters
41
43
# and hyphens. An ArgumentError is raised if +app+ is invalid.
@@ -62,7 +64,7 @@ def validate_app(app)
62
64
# URI.parse('gid://bcx') # => URI::GID instance
63
65
# URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError
64
66
def parse ( uri )
65
- generic_components = URI . split ( uri ) << URI :: RFC2396_Parser . new << true # RFC2396 parser, true arg_check
67
+ generic_components = URI . split ( uri ) << URI_PARSER << true # RFC2396 parser, true arg_check
66
68
new ( *generic_components )
67
69
end
68
70
You can’t perform that action at this time.
0 commit comments