* [PATCH] restart "source ed" after env changes
@ 2014-12-24 23:41 7% Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2014-12-24 23:41 UTC (permalink / raw)
To: dtas-all
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.
---
lib/dtas/player/client_handler.rb | 4 ++--
1 file 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
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-12-24 23:41 7% [PATCH] restart "source ed" after env changes Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/dtas.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).