aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 20:04:52 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 20:04:52 +0000
commita4044b5e70eb5298907e13328259b83f5296c29c (patch)
tree62502f5fce4c1bdb541634452d7383e7cfc113ac /spec
parent27c93b80354c9ca495d2bca064e1b992758d6dc1 (diff)
downloadruby-a4044b5e70eb5298907e13328259b83f5296c29c.tar.gz
Ignore the libruby check if it cannot be found
* ENV['RUBY_EXE'] can be just 'ruby' and is not an absolute path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/optional/capi/spec_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb
index f43a9f345b..373012a869 100644
--- a/spec/ruby/optional/capi/spec_helper.rb
+++ b/spec/ruby/optional/capi/spec_helper.rb
@@ -26,15 +26,15 @@ def compile_extension(name)
libruby_so = RbConfig::CONFIG['LIBRUBY_SO']
ruby_library = "#{RbConfig::CONFIG['libdir']}/#{libruby_so}"
unless libruby_so and File.exist?(ruby_library)
- # Statically-compiled lib in the binary
- ruby_library = ENV['RUBY_EXE']
+ # Statically-compiled lib in the binary, ignore this check
+ ruby_library = nil
end
return lib if File.exist?(lib) and
File.mtime(lib) > File.mtime("#{extension_path}/rubyspec.h") and
File.mtime(lib) > File.mtime("#{extension_path}/#{ext}.c") and
File.mtime(lib) > File.mtime(ruby_header) and
- File.mtime(lib) > File.mtime(ruby_library) and
+ (!ruby_library || File.mtime(lib) > File.mtime(ruby_library)) and
true # sentinel
# Copy needed source files to tmpdir