lib/rbbt/util/misc/development.rb in rbbt-util-5.13.35 vs lib/rbbt/util/misc/development.rb in rbbt-util-5.13.36

- old
+ new

@@ -1,6 +1,16 @@ module Misc + def self.pre_fork + Persist::CONNECTIONS.values.each do |db| db.close if db.write? end + ObjectSpace.each_object(Mutex) do |m| + begin + m.unlock + rescue ThreadError + end if m.locked? + end + end + def self.string2const(string) return nil if string.nil? mod = Kernel string.to_s.split('::').each do |str|