mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
1f861a6ea8
commit
3a18a62d44
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue