globalid icon indicating copy to clipboard operation
globalid copied to clipboard

globalid is broken with Ruby 3.4 / URI 1.0.2

Open voxik opened this issue 11 months ago • 1 comments

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

voxik avatar Dec 11 '24 17:12 voxik

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

voxik avatar Dec 13 '24 12:12 voxik