Skip to content

Commit 5d30d69

Browse files
committed
Keep using URI::RFC2396_PARSER parser
The default parser in URI 1.0.0 / Ruby 3.4 has been changed to RFC3986 [[1]]. This causes test failures such as: ~~~ ... snip ... Failure: GlobalIDTest#test_invalid_app_name [test/cases/global_id_test.rb:13]: ArgumentError expected but nothing was raised. rails test test/cases/global_id_test.rb:8 F ... snip ... ~~~ where underscores / ampersands are now allowed in host. Keep using `URI::RFC2396_PARSER` for compatibility. Fixes #190 [1]: ruby/uri#107
1 parent 488ab6c commit 5d30d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/global_id/uri/gid.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def validate_app(app)
6262
# URI.parse('gid://bcx') # => URI::GID instance
6363
# URI::GID.parse('gid://bcx/') # => raises URI::InvalidComponentError
6464
def parse(uri)
65-
generic_components = URI.split(uri) << nil << true # nil parser, true arg_check
65+
generic_components = URI.split(uri) << URI::RFC2396_PARSER << true # nil parser, true arg_check
6666
new(*generic_components)
6767
end
6868

0 commit comments

Comments
 (0)