extras/try_gzip_static.rb in yahns-1.11.0 vs extras/try_gzip_static.rb in yahns-1.12.0
- old
+ new
@@ -1,8 +1,9 @@
# -*- encoding: binary -*-
-# Copyright (C) 2013-2015 all contributors <yahns-public@yhbt.net>
-# License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
+# Copyright (C) 2013-2016 all contributors <yahns-public@yhbt.net>
+# License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
+# frozen_string_literal: true
require 'time'
require 'rack/utils'
require 'rack/mime'
require 'kgio'
@@ -13,10 +14,10 @@
# only used if the server does not handle #to_path,
# we actually hit this if serving the gzipped file in the first place,
# _and_ Rack::Deflater is used in the middleware stack. Oh well...
def each
- buf = ""
+ buf = ''.dup
rsize = 8192
if @sf_range
file.seek(@sf_range.begin)
sf_count = @sf_range.end - @sf_range.begin + 1
while sf_count > 0