mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fa7a5d5477
* lib/mkmf.rb (create_makefile): emit no rules for static library if $static is nil, e.g., outside of ext/. * lib/test/unit/ui/console/testrunner.rb (test_started): show test name via $0. * runruby.rb: set environments to use the compiled binary. * test/runner.rb: do nothing while cross-compiling. * test/drb/drbtest.rb, test/soap/calc/test_calc_cgi.rb: use envutil to know ruby binary. * test/ruby/envutil.rb: give priority to RUBY environment variable to use just compiled binary and libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
22 lines
492 B
Ruby
22 lines
492 B
Ruby
module EnvUtil
|
|
def rubybin
|
|
miniruby = "miniruby"
|
|
3.times do
|
|
if File.exist? miniruby or File.exist? miniruby+".exe"
|
|
return File.expand_path(miniruby)
|
|
end
|
|
miniruby = File.join("..", miniruby)
|
|
end
|
|
begin
|
|
require "rbconfig"
|
|
ENV["RUBY"] or
|
|
File.join(
|
|
Config::CONFIG["bindir"],
|
|
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]
|
|
)
|
|
rescue LoadError
|
|
"ruby"
|
|
end
|
|
end
|
|
module_function :rubybin
|
|
end
|