lib/logging/repository.rb in TwP-logging-1.2.0 vs lib/logging/repository.rb in TwP-logging-1.2.2

- old
+ new

@@ -202,9 +202,31 @@ key = :root end end end + # :stopdoc: + def self.reset + if defined?(@singleton__instance__) + @singleton__mutex__.synchronize { + @singleton__instance__ = nil + } + else + @__instance__ = nil + class << self + nonce = class << Singleton; self; end + if defined?(nonce::FirstInstanceCall) + define_method(:instance, nonce::FirstInstanceCall) + else + remove_method(:instance) + Singleton.__init__(::Logging::Repository) + end + end + end + return nil + end + # :startdoc: + end # class Repository end # module Logging # EOF