Skip to content

Replace URI.escape with URI::DEFAULT_PARSER.escape#169

Open
r7kamura wants to merge 1 commit intorailslove:masterfrom
r7kamura:uri-escape-replace
Open

Replace URI.escape with URI::DEFAULT_PARSER.escape#169
r7kamura wants to merge 1 commit intorailslove:masterfrom
r7kamura:uri-escape-replace

Conversation

@r7kamura
Copy link
Copy Markdown

@r7kamura r7kamura commented Oct 9, 2025

This addresses an issue where this library does not work properly on Ruby 3.0 or later.

URI.escape has been deprecated since Ruby 3.0.

There are several possible replacements, but the existing test cases expect half-width spaces to be converted into %20. For that reason, I believe URI::DEFAULT_PARSER.escape is the most appropriate in this situation.

I ran this library’s test suite on Ruby 3.4 and confirmed that the test cases which had previously been failing now pass as a result of this change.

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.

1 participant