* tool/compile_prelude.rb: fix TMP_RUBY_PREFIX for relative load path
environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
790f631301
commit
7d6eb8e68b
@ -1,3 +1,8 @@
|
|||||||
|
Thu Nov 15 18:04:06 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* tool/compile_prelude.rb: fix TMP_RUBY_PREFIX for relative load path
|
||||||
|
environment.
|
||||||
|
|
||||||
Thu Nov 15 17:28:21 2007 Tanaka Akira <akr@fsij.org>
|
Thu Nov 15 17:28:21 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* tool/compile_prelude.rb: absolute path may not start with a slash.
|
* tool/compile_prelude.rb: absolute path may not start with a slash.
|
||||||
|
@ -33,8 +33,7 @@ lines_list = preludes.map {|filename|
|
|||||||
unless mkconf
|
unless mkconf
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
mkconf = RbConfig::MAKEFILE_CONFIG.merge('prefix'=>'#{TMP_RUBY_PREFIX}')
|
mkconf = RbConfig::MAKEFILE_CONFIG.merge('prefix'=>'#{TMP_RUBY_PREFIX}')
|
||||||
exlen = $:.reverse.find{|e|e!="."}.length - RbConfig::CONFIG["prefix"].length
|
setup_ruby_prefix = "TMP_RUBY_PREFIX = $:.reverse.find{|e|e!=\".\"}.sub(%r{(.*)/lib/.*}m, \"\\\\1\")\n"
|
||||||
setup_ruby_prefix = "TMP_RUBY_PREFIX = $:.reverse.find{|e|e!=\".\"}[0..#{-exlen-1}]\n"
|
|
||||||
teardown_ruby_prefix = 'Object.class_eval { remove_const "TMP_RUBY_PREFIX" }'
|
teardown_ruby_prefix = 'Object.class_eval { remove_const "TMP_RUBY_PREFIX" }'
|
||||||
end
|
end
|
||||||
if RbConfig::MAKEFILE_CONFIG.has_key? key
|
if RbConfig::MAKEFILE_CONFIG.has_key? key
|
||||||
|
Loading…
x
Reference in New Issue
Block a user