From 046dff7f11b57d91e58ac9845b60e82fdad38b14 Mon Sep 17 00:00:00 2001 From: eban Date: Mon, 13 Oct 2003 14:59:25 +0000 Subject: [PATCH] * test/ruby/envutil.rb: use Config::CONFIG["ruby_install_name"], not "ruby". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/envutil.rb | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16f446e461..a8a91f5814 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Oct 13 23:55:59 2003 WATANABE Hirofumi + + * test/ruby/envutil.rb: use Config::CONFIG["ruby_install_name"], + not "ruby". + Mon Oct 13 23:57:29 2003 Nobuyoshi Nakada * eval.c (rb_feature_p): match by classified suffix. diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 186fcae1e6..4bae3d9e3b 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -5,9 +5,17 @@ module EnvUtil if File.exist? miniruby or File.exist? miniruby+".exe" return File.expand_path(miniruby) end - miniruby = "../"+miniruby + miniruby = File.join("..", miniruby) + end + begin + require "rbconfig" + File.join( + Config::CONFIG["bindir"], + Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"] + ) + rescue LoadError + "ruby" end - "ruby" end module_function :rubybin end