mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Updates for frozen string literal compatibility. (#1376)
This commit is contained in:
parent
4db1dcd281
commit
b25dc5d128
5 changed files with 10 additions and 10 deletions
|
@ -229,8 +229,8 @@ module Puma
|
|||
end
|
||||
|
||||
def worker(index, master)
|
||||
title = "puma: cluster worker #{index}: #{master}"
|
||||
title << " [#{@options[:tag]}]" if @options[:tag] && !@options[:tag].empty?
|
||||
title = "puma: cluster worker #{index}: #{master}"
|
||||
title += " [#{@options[:tag]}]" if @options[:tag] && !@options[:tag].empty?
|
||||
$0 = title
|
||||
|
||||
Signal.trap "SIGINT", "IGNORE"
|
||||
|
|
|
@ -341,7 +341,7 @@ module Puma
|
|||
end
|
||||
|
||||
if bytes
|
||||
token = ""
|
||||
token = "".dup
|
||||
bytes.each_byte { |b| token << b.to_s(16) }
|
||||
else
|
||||
token = (0..count).to_a.map { rand(255).to_s(16) }.join
|
||||
|
|
|
@ -298,8 +298,8 @@ module Puma
|
|||
end
|
||||
|
||||
def title
|
||||
buffer = "puma #{Puma::Const::VERSION} (#{@options[:binds].join(',')})"
|
||||
buffer << " [#{@options[:tag]}]" if @options[:tag] && !@options[:tag].empty?
|
||||
buffer = "puma #{Puma::Const::VERSION} (#{@options[:binds].join(',')})"
|
||||
buffer += " [#{@options[:tag]}]" if @options[:tag] && !@options[:tag].empty?
|
||||
buffer
|
||||
end
|
||||
|
||||
|
|
|
@ -166,8 +166,8 @@ class Http11ParserTest < Minitest::Test
|
|||
end
|
||||
|
||||
# then large headers are rejected too
|
||||
get = "GET /#{rand_data(10,120)} HTTP/1.1\r\n"
|
||||
get << "X-Test: test\r\n" * (80 * 1024)
|
||||
get = "GET /#{rand_data(10,120)} HTTP/1.1\r\n"
|
||||
get += "X-Test: test\r\n" * (80 * 1024)
|
||||
assert_raises Puma::HttpParserError do
|
||||
parser.execute({}, get, 0)
|
||||
parser.reset
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestPersistent < Minitest::Test
|
|||
end
|
||||
|
||||
def lines(count, s=@client)
|
||||
str = ""
|
||||
str = "".dup
|
||||
Timeout.timeout(5) do
|
||||
count.times { str << s.gets }
|
||||
end
|
||||
|
@ -192,7 +192,7 @@ class TestPersistent < Minitest::Test
|
|||
@server.persistent_timeout = 3
|
||||
|
||||
req = @valid_request.to_s
|
||||
req << "GET /second HTTP/1.1\r\nHost: test.com\r\nContent-Type: text/plain\r\n\r\n"
|
||||
req += "GET /second HTTP/1.1\r\nHost: test.com\r\nContent-Type: text/plain\r\n\r\n"
|
||||
|
||||
@client << req
|
||||
|
||||
|
@ -209,7 +209,7 @@ class TestPersistent < Minitest::Test
|
|||
@server.persistent_timeout = 3
|
||||
|
||||
req = @valid_request.to_s
|
||||
req << "GET /second HTTP/1.1\r\nHost: test.com\r\nContent-Type: text/plain\r\n\r\n"
|
||||
req += "GET /second HTTP/1.1\r\nHost: test.com\r\nContent-Type: text/plain\r\n\r\n"
|
||||
|
||||
@client << req
|
||||
|
||||
|
|
Loading…
Reference in a new issue