1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb, ext/purelib.rb, lib/mkmf.rb, runruby.rb: clear default

load path to get rid of load pre-installed extensions/libraries.
  [ruby-core:11017]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-05-22 20:48:34 +00:00
parent 64bffee8d6
commit 80a0e2f753
6 changed files with 26 additions and 12 deletions

View file

@ -47,7 +47,9 @@ config["bindir"] = abs_archdir
ENV["RUBY"] = File.expand_path(ruby)
ENV["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
if !pure and e = ENV["RUBYLIB"]
if pure
libs << File.expand_path("ext", srcdir) << "-"
elsif e = ENV["RUBYLIB"]
libs |= e.split(File::PATH_SEPARATOR)
end
ENV["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR)
@ -61,15 +63,9 @@ if File.file?(libruby_so)
ENV["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ')
end
end
begin
open("puretest.rb", IO::EXCL|IO::CREAT|IO::WRONLY) do |f|
f.puts('$LOAD_PATH.replace(ENV["RUBYLIB"].split(File::PATH_SEPARATOR))')
end
rescue Errno::EEXIST
end
cmd = [ruby]
cmd << "-rpuretest.rb" if pure
cmd << "-rpurelib.rb" if pure
cmd.concat(ARGV)
cmd.unshift(*debugger) if debugger
exec(*cmd)