Project

General

Profile

Bug #4941 » gem_prelude_v2.diff

lazaridis.com (Lazaridis Ilias), 06/29/2011 04:04 PM

View differences:

"b/P:\\sand\\rubyi2\\sandbox\\ruby193\\gem_prelude.rb"
require 'rubygems.rb' if defined?(Gem)
begin
require 'rubygems.rb' if defined?(Gem)
rescue LoadError
#the current file directory (= source-tree-root)
fdir = File.dirname(__FILE__)
#add ./.ext/RUBY_PLATFORM thus external binary libraries work
$LOAD_PATH << File.expand_path(File.join(".ext", RUBY_PLATFORM), fdir )
#add "lib", so it finds rubygems.rb (and other libraries)
$LOAD_PATH << File.expand_path(File.join("lib"), fdir )
#add current file-dir, thus require "rbconfig.rb" works
$LOAD_PATH << File.expand_path(fdir)
#add ./.ext/common thus external libraries work
$LOAD_PATH << File.expand_path(File.join(".ext","common"), fdir )
#puts "\nActual library paths:"
#puts "---------------------"
#$LOAD_PATH.each { |i| p i }
#puts "---------------------"
require 'rubygems.rb' if defined?(Gem)
end
(2-2/2)