Skip to content

Fix Ruby 3.5 compatibility #80

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

Merged
merged 1 commit into from
May 12, 2025
Merged

Conversation

Earlopain
Copy link
Contributor

In Ruby 3.5 most of the cgi gem will be removed. Only the various escape/unescape methods will be retained by default.

For CGI.parse, there is a mostly equivalent method from URI.decode_www_form. The data is in a slightly different format, so it needs to be converted.
For CGI.unescape, depending on the Ruby version different files need to be required.

This works on Ruby 2.2 which amq-ruby still supports.

https://bugs.ruby-lang.org/issues/21258

In Ruby 3.5 most of the cgi gem will be removed. Only the various escape/unescape methods will be retained by default.

For `CGI.parse`, there is a mostly equivalent method from `URI.decode_www_form`. The data is in a slightly different
format, so it needs to be converted.
For `CGI.unescape`, depending on the Ruby version. different files need to be required.

https://bugs.ruby-lang.org/issues/21258
@michaelklishin
Copy link
Member

@Earlopain thank you, I will produce a new release now.

@michaelklishin michaelklishin merged commit 7612ab9 into ruby-amqp:main May 12, 2025
3 checks passed
@michaelklishin michaelklishin added this to the 2.3.4 milestone May 12, 2025
michaelklishin added a commit that referenced this pull request May 12, 2025
@michaelklishin
Copy link
Member

2.3.4 is out. Thanks again, @Earlopain.

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