Skip to content

Keep using URI RFC2396 parser #192

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Keep using URI RFC2396 parser #192

wants to merge 1 commit into from

Conversation

voxik
Copy link

@voxik voxik commented Dec 13, 2024

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 for compatibility.

Just FTR, I am not sure if this is the correct test. Maybe the failing test cases should be adjusted according to RFC3986 and underscores / ampersands allowed 🤷

Fixes #190

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 rails#190

[1]: ruby/uri#107
@voxik voxik changed the title Keep using URI::RFC2396_PARSER parser Keep using URI RFC2396 parser Dec 13, 2024
@voxik
Copy link
Author

voxik commented Dec 13, 2024

The Rails main branch requires Ruby 3.2+. The test matrix likely needs update to include Rails 8.0, etc, but that is out of scope for me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

globalid is broken with Ruby 3.4 / URI 1.0.2
1 participant