about summary refs log tree commit homepage
path: root/lib/yahns/tee_input.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/tee_input.rb')
-rw-r--r--lib/yahns/tee_input.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yahns/tee_input.rb b/lib/yahns/tee_input.rb
index 31ad9cc..7b69f13 100644
--- a/lib/yahns/tee_input.rb
+++ b/lib/yahns/tee_input.rb
@@ -1,6 +1,7 @@
 # -*- encoding: binary -*-
 # Copyright (C) 2013-2015 all contributors <yahns-public@yhbt.net>
 # License: GPLv2 or later (https://www.gnu.org/licenses/gpl-2.0.txt)
+# frozen_string_literal: true
 
 # acts like tee(1) on an input input to provide a input-like stream
 # while providing rewindable semantics through a File/StringIO backing
@@ -96,7 +97,7 @@ class Yahns::TeeInput < Yahns::StreamInput # :nodoc:
 
   # consumes the stream of the socket
   def consume!
-    junk = ""
+    junk = ''.dup
     rsize = __rsize
     nil while read(rsize, junk)
   end