1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/envutil.rb (EnvUtil::rubybin): give priority to

environment variable.  [ruby-dev:23538]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2004-05-19 14:45:49 +00:00
parent 9272ca4d2b
commit d3ba99c15f
2 changed files with 7 additions and 3 deletions

View file

@ -1,8 +1,10 @@
Wed May 19 18:00:44 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
Wed May 19 23:45:43 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/inlinetest.rb (InlineTest::loadtest): requiring library with
replaced $0 can make $0 == __FILE__ block be evaluated twice.
[ruby-dev:23538]
* test/ruby/envutil.rb (EnvUtil::rubybin): give priority to
environment variable. [ruby-dev:23538]
Wed May 19 11:08:10 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>

View file

@ -1,5 +1,8 @@
module EnvUtil
def rubybin
if ruby = ENV["RUBY"]
return ruby
end
miniruby = "miniruby"
3.times do
if File.exist? miniruby or File.exist? miniruby+".exe"
@ -9,7 +12,6 @@ module EnvUtil
end
begin
require "rbconfig"
ENV["RUBY"] or
File.join(
Config::CONFIG["bindir"],
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]