require 'monitor' require 'singleton' require 'set' class NotDefined; end # Core Classes, can't be excluded. %w{ kernel module object class file }.each{|n| require "RubyExt/#{n}"} require 'RubyExt/assert' require 'RubyExt/observable' require 'RubyExt/resource' require 'RubyExt/Resource/file_system_provider' # Need this complex loading for correct work of 'raise_without_self'' module RubyExt # libraries_in_working_dir = Dir.glob("*/**/lib").select{|f| File.directory? f}.collect{|f| File.expand_path f} # specs_in_working_dir = Dir.glob("*/**/spec").select{|f| File.directory? f}.collect{|f| File.expand_path f} directories = lambda do $LOAD_PATH.select{|f| ![/site_ruby/, /vendor_ruby/, /bin$/].any?{|re| f =~ re}}\ .collect{|f| File.expand_path f} # $LOAD_PATH.select{|dir| dir =~ /gems.+lib/} # $LOAD_PATH.select{|dir| dir =~ /gems.+spec/} + # [Dir.getwd] + # libraries_in_working_dir # specs_in_working_dir end Resource.add_resource_provider FileSystemProvider.new(directories) script = Resource.class_get "RubyExt::ClassLoader" eval script, TOPLEVEL_BINDING, Resource.class_to_virtual_file("RubyExt::ClassLoader") end