about summary refs log tree commit homepage
path: root/lib/dtas/player
diff options
authorEric Wong <e@80x24.org>2016-12-31 03:46:27 +0000
committerEric Wong <e@80x24.org>2016-12-31 07:02:49 +0000
commit6a27326c4ac9459e194bd082cfec200578980517 (patch)
tree9276ffe3cec78955b796f58818c5d8ff5f5be55c /lib/dtas/player
parent9152a00d3a706d93d7ed9705ce2529bd3d1f3772 (diff)
Ruby Hashes will automatically create frozen copies of unfrozen
strings used as hash keys to avoid accidental mutation.
Pre-freeze keys explicitly so the Ruby VM will not need to
create the frozen copy.
Diffstat (limited to 'lib/dtas/player')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb
index c24da81..05704c0 100644
--- a/lib/dtas/player/client_handler.rb
+++ b/lib/dtas/player/client_handler.rb
@@ -134,7 +134,7 @@ module DTAS::Player::ClientHandler # :nodoc:
       # or variable names.
       sink.valid_name?(name) or return io.emit("ERR sink name invalid")
-      sink.name = name
+      sink.name = name.freeze
       active_before = sink.active
       before = __sink_snapshot(sink)