about summary refs log tree commit homepage
path: root/extras/try_gzip_static.rb
diff options
context:
space:
mode:
Diffstat (limited to 'extras/try_gzip_static.rb')
-rw-r--r--extras/try_gzip_static.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/try_gzip_static.rb b/extras/try_gzip_static.rb
index 4c6a59b..851744b 100644
--- a/extras/try_gzip_static.rb
+++ b/extras/try_gzip_static.rb
@@ -1,6 +1,7 @@
 # -*- 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)
+# frozen_string_literal: true
 require 'time'
 require 'rack/utils'
 require 'rack/mime'
@@ -15,7 +16,7 @@ class TryGzipStatic
     # 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)