diff options
author | Eric Wong <e@80x24.org> | 2014-12-24 23:10:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-12-24 23:14:19 +0000 |
commit | 51c0beacc5e38ff8129c028615ea05cfe275fbce (patch) | |
tree | 85533b0e6f6c1e590a09367b043c43b4cccddffb /lib/dtas | |
parent | 84f516c13b9fa3c33f9d8c941a9530c35ef53530 (diff) | |
download | dtas-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/dtas')
-rw-r--r-- | lib/dtas/player/client_handler.rb | 4 |
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 |