about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-12-24 23:10:59 +0000
committerEric Wong <e@80x24.org>2014-12-24 23:14:19 +0000
commit51c0beacc5e38ff8129c028615ea05cfe275fbce (patch)
tree85533b0e6f6c1e590a09367b043c43b4cccddffb /lib
parent84f516c13b9fa3c33f9d8c941a9530c35ef53530 (diff)
downloaddtas-51c0beacc5e38ff8129c028615ea05cfe275fbce.tar.gz
Merely converting the `before' source information to a hash is not
enough, as the `env' sub-hash is mosified in-place and shared with
the `after' hash.  So use `inspect' to serialize and snapshot the
env and rely on a string comparison.
Diffstat (limited to 'lib')
-rw-r--r--lib/dtas/player/client_handler.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dtas/player/client_handler.rb b/lib/dtas/player/client_handler.rb
index c9ae2e4..37357f7 100644
--- a/lib/dtas/player/client_handler.rb
+++ b/lib/dtas/player/client_handler.rb
@@ -474,7 +474,7 @@ module DTAS::Player::ClientHandler # :nodoc:
     when "cat"
       io.emit(src.to_source_cat.to_yaml)
     when "ed"
-      before = src.to_state_hash
+      before = src.to_state_hash.inspect
       sd = src.source_defaults
       msg.each do |kv|
         k, v = kv.split(/=/, 2)
@@ -492,7 +492,7 @@ module DTAS::Player::ClientHandler # :nodoc:
           source_map_reload
         end
       end
-      after = src.to_state_hash
+      after = src.to_state_hash.inspect
       __current_requeue if before != after && @current.class == src.class
       io.emit("OK")
     else