Skip to content

Commit

Permalink
Revert an accidentally merged change [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Apr 17, 2024
1 parent 0963874 commit 55b68d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/ruby/optional/capi/spec_helper.rb
Expand Up @@ -33,6 +33,12 @@ def compile_extension(name)
ruby_header = "#{rubyhdrdir}/ruby.h"
abi_header = "#{rubyhdrdir}/ruby/internal/abi.h"

if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
# below is defined since 2.1, except for mswin, and maybe other platforms
libdirname = RbConfig::CONFIG.fetch 'libdirname', 'libdir'
libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
end

begin
mtime = File.mtime(lib)
rescue Errno::ENOENT
Expand All @@ -43,6 +49,7 @@ def compile_extension(name)
when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c")
when mtime <= File.mtime(ruby_header)
when (mtime <= File.mtime(abi_header) rescue nil)
when libruby && mtime <= File.mtime(libruby)
else
return lib # up-to-date
end
Expand Down

0 comments on commit 55b68d6

Please sign in to comment.