globalid
globalid copied to clipboard
globalid is broken with Ruby 3.4 / URI 1.0.2
Testing globalid against Ruby 3.4, I observe errors 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 ...
Looking into root cause, it seems that this is due to change in URI, which now accepts underscore / ampersand as a host. I have reported the issue here
So after analysis, I believe that this is the culprit:
$ ruby -v -ruri -e "p URI::Parser"
ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
URI::RFC2396_Parser
$ ruby -v -ruri -e "p URI::Parser"
ruby 3.4.0dev (2024-12-06 master 3901df708d) +PRISM [x86_64-linux]
URI::RFC3986_Parser
The easy fix could be to keep using the URI::RFC2396_Parser