[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)
|
||||
chunked_p = chunked?
|
||||
|
||||
buf = String.new
|
||||
buf = +''
|
||||
params.each do |key, value, h={}|
|
||||
key = quote_string(key, charset)
|
||||
filename =
|
||||
@ -401,7 +401,7 @@ class Net::HTTPGenericRequest
|
||||
if /[\r\n]/ =~ reqline
|
||||
raise ArgumentError, "A Request-Line must not contain CR or LF"
|
||||
end
|
||||
buf = String.new
|
||||
buf = +''
|
||||
buf << reqline << "\r\n"
|
||||
each_capitalized do |k,v|
|
||||
buf << "#{k}: #{v}\r\n"
|
||||
|
@ -648,7 +648,7 @@ class Net::HTTPResponse
|
||||
if block
|
||||
Net::ReadAdapter.new(block)
|
||||
else
|
||||
dest || String.new
|
||||
dest || +''
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user