about summary refs log tree commit homepage
path: root/lib/yahns/queue_epoll.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-01-02 22:29:12 +0000
committerEric Wong <e@80x24.org>2016-01-02 22:29:28 +0000
commit9e24bae3428f726800da2963a8f2695f7d4064cd (patch)
treedd4ce29efffa4f0da9c6d9ada903a277ec81196b /lib/yahns/queue_epoll.rb
parent1105a6957eed26a922a27bd6e6dbbc457524b664 (diff)
downloadyahns-9e24bae3428f726800da2963a8f2695f7d4064cd.tar.gz
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.
Diffstat (limited to 'lib/yahns/queue_epoll.rb')
-rw-r--r--lib/yahns/queue_epoll.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yahns/queue_epoll.rb b/lib/yahns/queue_epoll.rb
index c685fae..ba32bdc 100644
--- a/lib/yahns/queue_epoll.rb
+++ b/lib/yahns/queue_epoll.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
 #
 # This is the dangerous, low-level epoll interface for sleepy_penguin
 # It is safe as long as you're aware of all potential concurrency
@@ -32,7 +33,7 @@ class Yahns::Queue < SleepyPenguin::Epoll::IO # :nodoc:
   end
 
   def thr_init
-    Thread.current[:yahns_rbuf] = ""
+    Thread.current[:yahns_rbuf] = ''.dup
     Thread.current[:yahns_fdmap] = @fdmap
     Thread.current[:yahns_queue] = self
   end