vendor/bundle/ruby/2.7.0/gems/octokit-4.20.0/lib/octokit/middleware/follow_redirects.rb
# Internal: Escapes unsafe characters from a URL which might be a path
# component only or a fully-qualified URI so that it can be joined onto a
# URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not
# risk double-escaping.
Escapes unsafe characters from a URL which might be a path
component only or a fully-qualified URI so that it can be joined onto a
URI:HTTP using the `+` operator. Doesn't escape "%" characters so to not
risk double-escaping.
Escapes unsafe characters from a URL which might be a path component only or a fully - qualified URI so that it can be joined onto a URI : HTTP using the ` + ` operator . Doesn ' t escape " % " characters so to not risk double - escaping .
def safe_escape(uri)
        uri.to_s.gsub(URI_UNSAFE) { |match|
          "%" + match.unpack("H2" * match.bytesize).join("%").upcase
        }
      end
def safe_escape ( uri ) uri . to_s . gsub ( URI_UNSAFE ) { | match | "%" + match . unpack ( "H2" * match . bytesize ) . join ( "%" ) . upcase } end
Internal: Escapes unsafe characters from a URL which might be a path
component only or a fully-qualified URI so that it can be joined onto a
URI:HTTP using the `+` operator.
Internal : Escapes unsafe characters from a URL which might be a path component only or a fully - qualified URI so that it can be joined onto a URI : HTTP using the ` + ` operator .
uri
<not_specific>