[ruby/net-http] use +'' everywhere
https://github.com/ruby/net-http/commit/1077427152
This commit is contained in:
parent
70da92cdf7
commit
ea321a654d
@ -316,7 +316,7 @@ class Net::HTTPGenericRequest
|
|||||||
boundary ||= SecureRandom.urlsafe_base64(40)
|
boundary ||= SecureRandom.urlsafe_base64(40)
|
||||||
chunked_p = chunked?
|
chunked_p = chunked?
|
||||||
|
|
||||||
buf = String.new
|
buf = +''
|
||||||
params.each do |key, value, h={}|
|
params.each do |key, value, h={}|
|
||||||
key = quote_string(key, charset)
|
key = quote_string(key, charset)
|
||||||
filename =
|
filename =
|
||||||
@ -401,7 +401,7 @@ class Net::HTTPGenericRequest
|
|||||||
if /[\r\n]/ =~ reqline
|
if /[\r\n]/ =~ reqline
|
||||||
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
||||||
end
|
end
|
||||||
buf = String.new
|
buf = +''
|
||||||
buf << reqline << "\r\n"
|
buf << reqline << "\r\n"
|
||||||
each_capitalized do |k,v|
|
each_capitalized do |k,v|
|
||||||
buf << "#{k}: #{v}\r\n"
|
buf << "#{k}: #{v}\r\n"
|
||||||
|
@ -648,7 +648,7 @@ class Net::HTTPResponse
|
|||||||
if block
|
if block
|
||||||
Net::ReadAdapter.new(block)
|
Net::ReadAdapter.new(block)
|
||||||
else
|
else
|
||||||
dest || String.new
|
dest || +''
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user