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. --- lib/yahns/http_response.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/yahns/http_response.rb') diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb index 99bf664..57910b0 100644 --- a/lib/yahns/http_response.rb +++ b/lib/yahns/http_response.rb @@ -1,6 +1,7 @@ # -*- encoding: binary -*- # Copyright (C) 2013-2015 all contributors # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt) +# frozen_string_literal: true require_relative 'stream_file' require_relative 'wbuf_str' @@ -134,7 +135,7 @@ module Yahns::HttpResponse # :nodoc: code = status.to_i msg = Rack::Utils::HTTP_STATUS_CODES[code] buf = "#{response_start}#{msg ? %Q(#{code} #{msg}) : status}\r\n" \ - "Date: #{httpdate}\r\n" + "Date: #{httpdate}\r\n".dup headers.each do |key, value| case key when %r{\ADate\z}i -- cgit v1.2.3-24-ge0c7