lib/knj/objects.rb in knjrbfw-0.0.95 vs lib/knj/objects.rb in knjrbfw-0.0.96
- old
+ new
@@ -13,11 +13,11 @@
@objects = {}
@locks = {}
@data = {}
@lock_require = Monitor.new
- require "wref" if @args[:cache] == :weak and !Kernel.const_defined?(:Wref)
+ Knj.gem_require(:Wref, "wref") if @args[:cache] == :weak and !Kernel.const_defined?(:Wref)
require "#{@args[:array_enumerator_path]}array_enumerator" if @args[:array_enum] and !Kernel.const_defined?(:Array_enumerator)
#Set up various events.
@events = Knj::Event_handler.new
@events.add_event(:name => :no_html, :connections_max => 1)
@@ -28,9 +28,10 @@
raise "No DB given." if !@args[:db] and !@args[:custom]
raise "No class path given." if !@args[:class_path] and (@args[:require] or !@args.key?(:require))
if args[:require_all]
+ Knj.gem_require(:Php4r, "php4r")
loads = []
Dir.foreach(@args[:class_path]) do |file|
next if file == "." or file == ".." or !file.match(/\.rb$/)
file_parsed = file
\ No newline at end of file