Revert an accidentally merged change [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2024-04-17 19:16:00 +09:00
parent 09638741ba
commit 55b68d6cdc
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -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
@ -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