Skip to content

Conversation

Earlopain
Copy link

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

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

CGI.parse is used only in tests and can be replaced by URI.decode_www_form, which returns an array of arrays. So it just needs to be converted to a hash before.

CGI.escape is available by requiring cgi/escape and doesn't emit a warning on Ruby 3.5


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea.
  • Follow the instructions in CONTRIBUTING. Most importantly, ensure the tests and linter pass by running bundle exec rake ci in the gem subdirectory.
  • Update code documentation if necessary.

closes: None

Earlopain added 2 commits May 13, 2025 14:11
This method will be gone in Ruby 3.5
In Ruby 3.5 most of the `cgi` gem will be removed. Only the various escape/unescape methods will be retained by default.

https://bugs.ruby-lang.org/issues/21258
@Earlopain Earlopain requested review from yoshi-approver and a team as code owners May 13, 2025 16:29
@Earlopain Earlopain changed the title Only load from cgi what is required for Ruby 3.5 chore(storage): Only load from cgi what is required for Ruby 3.5 May 13, 2025
@Earlopain
Copy link
Author

Can someone take a look? The actual change is really small, just changing a require to a more specific one in two places, the rest is test-only.

Thanks!

@viacheslav-rostovtsev
Copy link
Member

I'm looking at it

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