Skip to content

[2.2-stable] Replace usage of CGI::Cookie#2329

Merged
ioquatix merged 1 commit intorack:2-2-stablefrom
byroot:2-2-cig-cookie
May 17, 2025
Merged

[2.2-stable] Replace usage of CGI::Cookie#2329
ioquatix merged 1 commit intorack:2-2-stablefrom
byroot:2-2-cig-cookie

Conversation

@byroot
Copy link
Copy Markdown
Contributor

@byroot byroot commented May 12, 2025

In Ruby 3.5, cgi will only contain functions related to escaping/unescaping.

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

This is not an exact replicate of course, (CGI::Cookie) has some validations and coerces on setters but considering for that purpose this is, they don't seem necessary? During construction of the object rack already does conversions as necessary and setters don't make much sense, and aren't documented/tested for.

Although, for improved backwards compatibility, it wouldn't be much effort to make them attr_accesor instead.

cc @jeremyevans @Earlopain

@byroot
Copy link
Copy Markdown
Contributor Author

byroot commented May 12, 2025

If you desire a fix for the Ruby 3.4 failure: #2330

In Ruby 3.5, `cgi` will only contain functions related to escaping/unescaping.

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

This is not an exact replicate of course, (`CGI::Cookie`) has some validations and coerces on setters but considering
for that purpose this is, they don't seem necessary?
During construction of the object rack already does conversions as necessary and setters don't make much sense, and aren't documented/tested for.

Although, for improved backwards compatibility, it wouldn't be much effort to make them `attr_accesor` instead.

Co-Authored-By: Earlopain <[email protected]>
@ioquatix ioquatix merged commit 2f928b9 into rack:2-2-stable May 17, 2025
10 checks passed
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.

3 participants