lib/zk/fork_hook.rb in zk-1.9.6 vs lib/zk/fork_hook.rb in zk-1.10.0
- old
+ new
@@ -1,16 +1,16 @@
module ZK
module ForkHook
include ZK::Logger
extend self
- @mutex = Mutex.new unless @mutex
+ @mutex = Mutex.new unless defined?(@mutex)
@hooks = {
:prepare => [],
:after_child => [],
:after_parent => [],
- } unless @hooks
+ } unless defined?(@hooks)
attr_reader :hooks, :mutex
# @private
def fire_prepare_hooks!