Project

General

Profile

Actions

Feature #18593

open

Add back URI.escape

Added by kallisti5 (Alexander von Gluck) almost 3 years ago. Updated almost 3 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:107659]

Description

It seems like there should have been a compatibility call left in place for the removal of URI escape between stdlib 2.x and 3.x

As seen here:
https://github.com/qoobaa/s3/issues/132

Various projects are breaking due to the move of escape to DEFAULT_PARSER

--- /home/kallisti5/.gem/ruby/3.0.0/gems/s3-0.3.29/lib/s3/bucket.rb.original	2022-02-18 13:26:37.247078560 -0600
+++ /home/kallisti5/.gem/ruby/3.0.0/gems/s3-0.3.29/lib/s3/bucket.rb	2022-02-18 13:26:47.707146732 -0600
@@ -151,7 +151,7 @@
       # If there are more than 1000 objects S3 truncates listing and
       # we need to request another listing for the remaining objects.
       while parse_is_truncated(response.body)
-        next_request_options = {:marker => URI.escape(objects_attributes.last[:key])}
+        next_request_options = {:marker => URI::DEFAULT_PARSER.escape(objects_attributes.last[:key])}
 
         if max_keys
           break if objects_attributes.length >= max_keys

Related issues 1 (1 open0 closed)

Related to Ruby master - Misc #17309: URI.escape being deprecated, yet there is no replacementOpenActions
Actions

Also available in: Atom PDF

Like0
Like0Like0