diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-21 08:30:09 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-08-21 08:30:09 +0000 |
| commit | acae1b4416f45a4f88aaef2d23e785a6b14087d9 (patch) | |
| tree | acec075393700c201efd71cc2e3356e43c13212f /ext | |
| parent | a06c4fd090f2517465572bb2245efd3c06e3a438 (diff) | |
| download | ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.gz ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.tar.xz ruby-acae1b4416f45a4f88aaef2d23e785a6b14087d9.zip | |
* eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/extmk.rb.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index a2f1a2cbf..cebb11521 100644 --- a/ext/extmk.rb.in +++ b/ext/extmk.rb.in @@ -295,6 +295,25 @@ SRC return true end +def find_executable(bin, path = nil) + if path.nil? + path = ENV['PATH'].split(Config::CONFIG['PATH_SEPARATOR']) + else + path = path.split(Config::CONFIG['PATH_SEPARATOR']) + end + + bin += "@EXEEXT@" + for dir in path + file = File.join(dir, bin) + if FileTest.executable?(file) + return file + else + next + end + end + return nil +end + def arg_config(config, default=nil) unless defined? $configure_args $configure_args = {} |
