diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-07 03:31:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-07 03:31:04 +0000 |
commit | 3c164fd92eb42acd915bdf702c73dc1be5a77d5f (patch) | |
tree | 0d504f2079e9e81cb60ec905abb58e1910a21d24 /runruby.rb | |
parent | 7f0a43c1e13bb0dbfb79aebd6b7b1f5f79d615ed (diff) |
* runruby.rb: added --cpu option.
* runruby.rb: skips version check in rbconfig.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'runruby.rb')
-rwxr-xr-x | runruby.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runruby.rb b/runruby.rb index 900469c1d4..b2a8802be1 100755 --- a/runruby.rb +++ b/runruby.rb @@ -13,6 +13,8 @@ while arg = ARGV[0] srcdir = value when re =~ "archdir" archdir = value + when re =~ "cpu" + precommand << "arch" << "-arch" << value when re =~ "extout" extout = value when re =~ "pure" @@ -37,8 +39,9 @@ archdir ||= '.' abs_archdir = File.expand_path(archdir) $:.unshift(abs_archdir) -require 'rbconfig' -config = RbConfig::CONFIG +config = File.read(conffile = File.join(abs_archdir, 'rbconfig.rb')) +config.sub!(/^(\s*)RUBY_VERSION\s*==.*(\sor\s*)$/, '\1true\2') +config = Module.new {module_eval(config, conffile)}::Config::CONFIG ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT']) unless File.exist?(ruby) |