ruby-changes:10550
From: nobu <ko1@a...>
Date: Sat, 7 Feb 2009 12:31:18 +0900 (JST)
Subject: [ruby-changes:10550] Ruby:r22105 (trunk): * runruby.rb: added --cpu option.
nobu 2009-02-07 12:31:04 +0900 (Sat, 07 Feb 2009) New Revision: 22105 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22105 Log: * runruby.rb: added --cpu option. * runruby.rb: skips version check in rbconfig.rb. Modified files: trunk/ChangeLog trunk/runruby.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 22104) +++ ChangeLog (revision 22105) @@ -1,7 +1,11 @@ -Sat Feb 7 11:57:13 2009 Nobuyoshi Nakada <nobu@r...> +Sat Feb 7 12:31:03 2009 Nobuyoshi Nakada <nobu@r...> * runruby.rb: added --precommand and --show options. + * runruby.rb: added --cpu option. + + * runruby.rb: skips version check in rbconfig.rb. + Sat Feb 7 11:44:06 2009 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (have_header): needs dependent headers if trying to Index: runruby.rb =================================================================== --- runruby.rb (revision 22104) +++ runruby.rb (revision 22105) @@ -13,6 +13,8 @@ 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 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/