Skip to content

Commit

Permalink
[ruby/net-http] turn on frozen strings for net/http/generic_request
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalpickles authored and matzbot committed Aug 16, 2023
1 parent 8d04260 commit 2fbd8dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/net/http/generic_request.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: false
# frozen_string_literal: true
#
# \HTTPGenericRequest is the parent of the Net::HTTPRequest class.
#
Expand Down Expand Up @@ -316,7 +316,7 @@ def encode_multipart_form_data(out, params, opt)
boundary ||= SecureRandom.urlsafe_base64(40)
chunked_p = chunked?

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

0 comments on commit 2fbd8dc

Please sign in to comment.