From 9e24bae3428f726800da2963a8f2695f7d4064cd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 2 Jan 2016 22:29:12 +0000 Subject: enable frozen_string_literal for Ruby 2.3+ There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet. --- test/test_ssl.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_ssl.rb') 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 # 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 -- cgit v1.2.3-24-ge0c7