Permalink
Browse files

Fix for issue #52, clean up more in EventHandler#unregister

  • Loading branch information...
1 parent e237c78 commit a39f18bd1882f7ed803f5f5228cfae958a335bb4 @slyphon slyphon committed Oct 9, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/zk/event_handler.rb
View
@@ -144,6 +144,7 @@ def unregister(*args)
ary = @callbacks[subscription.path]
idx = ary.index(subscription) and ary.delete_at(idx)
+ @callbacks.delete(subscription.path) if ary.empty?
end
nil

0 comments on commit a39f18b

Please sign in to comment.