diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-23 14:56:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-06-23 14:56:40 +0000 |
commit | 58f4fbcec3e191d86dd764c07f7142c6778916e5 (patch) | |
tree | b77e69dda486949d10032c01d623c8db7ff051e1 /runruby.rb | |
parent | 61d0a56884fa9f01c490f36c90eaebf7594347d3 (diff) | |
download | ruby-58f4fbcec3e191d86dd764c07f7142c6778916e5.tar.gz ruby-58f4fbcec3e191d86dd764c07f7142c6778916e5.tar.xz ruby-58f4fbcec3e191d86dd764c07f7142c6778916e5.zip |
* runruby.rb: should load built rbconfig.rb.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'runruby.rb')
-rwxr-xr-x | runruby.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runruby.rb b/runruby.rb index a175dcb9a..e74944155 100755 --- a/runruby.rb +++ b/runruby.rb @@ -18,18 +18,20 @@ while arg = ARGV[0] ARGV.shift end -require 'rbconfig' -config = Config::CONFIG - srcdir ||= File.dirname(__FILE__) archdir ||= '.' +abs_archdir = File.expand_path(archdir) +$:.unshift(abs_archdir) + +require 'rbconfig' +config = Config::CONFIG + ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) unless File.exist?(ruby) abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n" end -abs_archdir = File.expand_path(archdir) libs = [abs_archdir, File.expand_path("lib", srcdir)] if extout abs_extout = File.expand_path(extout) |