1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

remove string literal concatenation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-10-25 10:07:22 +00:00
parent acd82f6e24
commit db1f7079b6
16 changed files with 35 additions and 44 deletions

View file

@ -186,9 +186,7 @@ class Net::HTTPGenericRequest
if filename
filename = quote_string(filename, charset)
type = h[:content_type] || 'application/octet-stream'
buf << "Content-Disposition: form-data; " \
"name=\"#{key}\"; filename=\"#{filename}\"\r\n" \
"Content-Type: #{type}\r\n\r\n"
buf << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{filename}\"\r\nContent-Type: #{type}\r\n\r\n"
if !out.respond_to?(:write) || !value.respond_to?(:read)
# if +out+ is not an IO or +value+ is not an IO
buf << (value.respond_to?(:read) ? value.read : value)