Skip to content

Commit b92ade0

Browse files
turn on frozen strings for net/http/generic_request
1 parent a5203c9 commit b92ade0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net/http/generic_request.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# frozen_string_literal: false
1+
# frozen_string_literal: true
22
#
33
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
44
#
@@ -316,7 +316,7 @@ def encode_multipart_form_data(out, params, opt)
316316
boundary ||= SecureRandom.urlsafe_base64(40)
317317
chunked_p = chunked?
318318

319-
buf = ''
319+
buf = String.new
320320
params.each do |key, value, h={}|
321321
key = quote_string(key, charset)
322322
filename =
@@ -401,7 +401,7 @@ def write_header(sock, ver, path)
401401
if /[\r\n]/ =~ reqline
402402
raise ArgumentError, "A Request-Line must not contain CR or LF"
403403
end
404-
buf = ""
404+
buf = String.new
405405
buf << reqline << "\r\n"
406406
each_capitalized do |k,v|
407407
buf << "#{k}: #{v}\r\n"

0 commit comments

Comments
 (0)