Skip to content

Commit

Permalink
Fix for issue #52, clean up more in EventHandler#unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon committed Oct 9, 2012
1 parent e237c78 commit a39f18b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/zk/event_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a39f18b

Please sign in to comment.