fix: monkeypatch URI.escape, for now

Phillip Davis created

pending bigger move to newer Ruby version which supports Gems that don't
rely on old, broken APIs from the stdlib

Change summary

lib/bandwidth_patch.rb | 9 +++++++++
1 file changed, 9 insertions(+)

Detailed changes

lib/bandwidth_patch.rb 🔗

@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+module URI
+	unless respond_to?(:escape)
+		def self.escape(*args, **kwargs)
+			URI::DEFAULT_PARSER.escape(*args, **kwargs)
+		end
+	end
+end