Skip to content

Commit

Permalink
Suppress warning: URI.escape is obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Apr 9, 2017
1 parent 65fde67 commit de9f284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yajl/http_stream.rb
Expand Up @@ -101,7 +101,7 @@ def self.request(method, uri, opts = {}, &block)
default_headers["Content-Type"] = opts["Content-Type"] || "application/x-www-form-urlencoded"
body = opts.delete(:body)
if body.is_a?(Hash)
body = body.keys.collect {|param| "#{URI.escape(param.to_s)}=#{URI.escape(body[param].to_s)}"}.join('&')
body = body.keys.collect {|param| "#{::CGI.escape(param.to_s)}=#{::CGI.escape(body[param].to_s)}"}.join('&')
end
default_headers["Content-Length"] = body.length
end
Expand Down

0 comments on commit de9f284

Please sign in to comment.