Skip to content

[Ruby 3.2] Add spec for CGI.unescapeURIComponent#1299

Merged
andrykonchin merged 2 commits into
ruby:masterfrom
trinistr:3.2-cgi-unescape-uri-component
Nov 19, 2025
Merged

[Ruby 3.2] Add spec for CGI.unescapeURIComponent#1299
andrykonchin merged 2 commits into
ruby:masterfrom
trinistr:3.2-cgi-unescape-uri-component

Conversation

@trinistr
Copy link
Copy Markdown
Contributor

@trinistr trinistr commented Nov 12, 2025

From #1016

CGI.escapeURIComponent and CGI.unescapeURIComponent are added.
[Feature #18822]

Spec for .escapeURIComponent was done in #1080.

This is pretty much the spec for .escapeURIComponent with reversed inputs and outputs and incorporating fix from 7d8998a. Main difference is that unescape... does not preserve encoding, instead accepting target encoding as an argument.

I also noticed a copy-paste typo in the test for UnboundMethod#==, creating a separate PR seemed unnecessary .

@trinistr trinistr marked this pull request as ready for review November 12, 2025 12:39
Comment thread library/cgi/unescapeURIComponent_spec.rb
Comment thread library/cgi/unescapeURIComponent_spec.rb
@trinistr trinistr force-pushed the 3.2-cgi-unescape-uri-component branch from f79dc26 to b7f5ed4 Compare November 17, 2025 19:21
Comment thread library/cgi/unescapeURIComponent_spec.rb
Comment thread library/cgi/escapeURIComponent_spec.rb Outdated
Comment thread core/unboundmethod/equal_value_spec.rb
Comment thread library/cgi/unescapeURIComponent_spec.rb
@trinistr trinistr force-pushed the 3.2-cgi-unescape-uri-component branch 2 times, most recently from 6ef66b7 to 4a31292 Compare November 19, 2025 13:00
Comment thread library/cgi/unescapeURIComponent_spec.rb
Comment thread library/cgi/unescapeURIComponent_spec.rb
Comment thread library/cgi/unescapeURIComponent_spec.rb
@trinistr trinistr force-pushed the 3.2-cgi-unescape-uri-component branch from 4a31292 to bb2afc7 Compare November 19, 2025 19:36
@andrykonchin andrykonchin merged commit d770427 into ruby:master Nov 19, 2025
13 checks passed
@andrykonchin
Copy link
Copy Markdown
Member

Thank you!

1 similar comment
@trinistr
Copy link
Copy Markdown
Contributor Author

Thank you!

@trinistr trinistr deleted the 3.2-cgi-unescape-uri-component branch November 20, 2025 14:44
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