[rb] Resolve uri
gem deprecation warning
#14770
Merged
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
Description
Ruby switches the default parser from RFC2396 to RFC3986. This parser contains all methods from the old parser but delegates to RFC2396 for a few and warns. Namely
extract
,make_regexp
,escape
, andunescape
.selenium currently supports Ruby >= 3.1, so the current old compatibility code is unnecessary.
RFC2396_PARSER
is a somewhat new addition, so some kind of check is still needed. It is available in Ruby 3.1 but early patch versions are missing it.Motivation and Context
Types of changes
Checklist
PR Type
Bug fix
Description
escaper
method inbridge.rb
to resolve a deprecation warning by usingURI::RFC2396_PARSER
when available.URI::RFC2396_PARSER
.URI::RFC3986_PARSER.escape
.Changes walkthrough 📝
bridge.rb
Resolve deprecation warning by updating URI parser usage
rb/lib/selenium/webdriver/remote/bridge.rb
escaper
method to useURI::RFC2396_PARSER
if defined.URI::DEFAULT_PARSER
ifURI::RFC2396_PARSER
is not defined.