diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-23 06:52:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-23 06:52:35 +0000 |
commit | 3a18a62d4488c470892d1daac446755bb590536a (patch) | |
tree | dd5436bf5bcf8d7eca2988b327c4e744536e4f40 | |
parent | 1f861a6ea812a7996c51809f312d525ecbb2d512 (diff) | |
download | ruby-3a18a62d4488c470892d1daac446755bb590536a.tar.gz |
envutil.rb: use EXEEXT
* test/ruby/envutil.rb (rubybin): use EXEEXT configured value
instead of the hard coded suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/envutil.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 8bddd65eb3..65b68df248 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -9,12 +9,13 @@ module EnvUtil return ruby end ruby = "ruby" - rubyexe = ruby+".exe" + exeext = RbConfig::CONFIG["EXEEXT"] + rubyexe = (ruby + exeext if exeext and !exeext.empty?) 3.times do if File.exist? ruby and File.executable? ruby and !File.directory? ruby return File.expand_path(ruby) end - if File.exist? rubyexe and File.executable? rubyexe + if rubyexe and File.exist? rubyexe and File.executable? rubyexe return File.expand_path(rubyexe) end ruby = File.join("..", ruby) |