about summary refs log tree commit homepage
path: root/test/test_ssl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ssl.rb')
-rw-r--r--test/test_ssl.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index c54cc3c..1379e93 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -1,5 +1,6 @@
 # Copyright (C) 2014,  all contributors <yahns-public@yhbt.net>
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# frozen_string_literal: true
 require_relative 'server_helper'
 require 'openssl'
 class TestSSL < Testcase
@@ -72,7 +73,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
     end
     client = ssl_client(host, port)
     client.write("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n")
-    buf = ''
+    buf = ''.dup
     Timeout.timeout(60) do
       buf << client.readpartial(111) until buf =~ /HI\z/
     end
@@ -104,7 +105,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
             when "remote_address\n"
               s.puts(s.remote_address.inspect)
             when "each\n"
-              line = ''
+              line = ''.dup
               s.each do |l|
                 l.strip!
                 line << l