summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-13 14:59:25 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-13 14:59:25 +0000
commit046dff7f11b57d91e58ac9845b60e82fdad38b14 (patch)
tree27f9b78b13f64783c678f7a770d8bb86fb79f4fc
parent4de0bb549b9d28e7f6e0799d3c3a08f615a49f51 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/envutil.rb12
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 16f446e..a8a91f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Oct 13 23:55:59 2003 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * test/ruby/envutil.rb: use Config::CONFIG["ruby_install_name"],
+ not "ruby".
+
Mon Oct 13 23:57:29 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (rb_feature_p): match by classified suffix.
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 186fcae..4bae3d9 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