lib/rbbt/util/misc/development.rb in rbbt-util-5.14.26 vs lib/rbbt/util/misc/development.rb in rbbt-util-5.14.28
- old
+ new
@@ -1,7 +1,8 @@
module Misc
- def self.add_libdir(dir)
+ def self.add_libdir(dir=nil)
+ dir ||= File.join(Path.caller_lib_dir(caller.first), 'lib')
$LOAD_PATH.unshift(dir) unless $LOAD_PATH.include? dir
end
def self.pre_fork
Persist::CONNECTIONS.values.each do |db| db.close if db.write? end