class Async::HTTP::Reference
def escape(string)
def escape(string) encoding = string.encoding string.b.gsub(/([^a-zA-Z0-9_.\-]+)/) do |m| '%' + m.unpack('H2' * m.bytesize).join('%').upcase end.force_encoding(encoding) end
def escape(string) encoding = string.encoding string.b.gsub(/([^a-zA-Z0-9_.\-]+)/) do |m| '%' + m.unpack('H2' * m.bytesize).join('%').upcase end.force_encoding(encoding) end