summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-30 12:03:44 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-08-30 12:03:44 +0900
commitbe9cc6c75865b24652d001f0f34f2e63180418c6 (patch)
tree054d6fa80043bf673f47c828be0e71f77e79ed9c /spec
parent7379a493bdf9b0f67b5db3471075473dfcf2ce2c (diff)
Fix rubyspec_capiext dependency and flags
- The file needed to link may be the import library. - Remove duplicate flags.
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/optional/capi/spec_helper.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb
index 2c36ead8d0..9bd2d9791c 100644
--- a/spec/ruby/optional/capi/spec_helper.rb
+++ b/spec/ruby/optional/capi/spec_helper.rb
@@ -32,9 +32,8 @@ def compile_extension(name)
ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
- libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' :
- RbConfig::CONFIG['libdirname'] # defined since 2.1
- libruby_so = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY_SO']}"
+ libdirname = RbConfig::CONFIG['libdirname'] # defined since 2.1
+ libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
end
begin
@@ -46,7 +45,7 @@ def compile_extension(name)
when mtime <= File.mtime("#{core_ext_dir}/rubyspec.h")
when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c")
when mtime <= File.mtime(ruby_header)
- when libruby_so && mtime <= File.mtime(libruby_so)
+ when libruby && mtime <= File.mtime(libruby)
else
return lib # up-to-date
end