Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix Qpid::Proton::DEFAULT_URI_PARSER for Ruby 3.4 #439

Closed
wants to merge 3 commits into from

Conversation

eduresende
Copy link
Contributor

On Ruby 3.4 the DEFAULT_URI_PARSER is throwing an error:

 DEFAULT_URI_PARSER = URI::Parser.new(:HOSTNAME => /(?:#{URI::PATTERN::HOSTNAME})|/)
'Class#new': wrong number of arguments (given 1, expected 0) (ArgumentError)
        from (irb):438:in '<main>'

This PR aims to replace the parser with a custom version that works well with Ruby 3.4

@astitcher
Copy link
Member

@eduresende Is there an initial version of rubby that this change works for? In other words how backwards compatible is this change?

@eduresende
Copy link
Contributor Author

@eduresende Is there an initial version of rubby that this change works for? In other words how backwards compatible is this change?

@astitcher Thank you for the answer. URI::RFC2396_Parser has existed since Ruby 2.2, but in Ruby 3.4 the default parser changed: https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/

2025-02-26 at 14 00

as the problem only happens after Ruby 3.4, I changed the PR to apply the fix only under this condition. This way, we won't have any risks of incompatibility with previous Ruby versions.

What do you think?

@astitcher
Copy link
Member

Yeah that seems like the right approach.

@astitcher
Copy link
Member

Merged

@astitcher astitcher closed this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants