ruby/ext/digest/digest_conf.rb
Nobuyoshi Nakada ba6a36e653 [ruby/digest] Fix --without-common-digest option
In `digest_conf`, "no implicit conversion of false into String"
TypeError is raised.

89e5e5fe3a
2025-05-02 09:20:47 +00:00

19 lines
522 B
Ruby

# frozen_string_literal: false
def digest_conf(name)
unless with_config("bundled-#{name}")
case cc = with_config("common-digest", true)
when true, false
else
cc = cc.split(/[\s,]++/).any? {|pat| File.fnmatch?(pat, name)}
end
if cc and File.exist?("#$srcdir/#{name}cc.h") and
have_header("CommonCrypto/CommonDigest.h")
$defs << "-D#{name.upcase}_USE_COMMONDIGEST"
$headers << "#{name}cc.h"
return :commondigest
end
end
$objs << "#{name}.#{$OBJEXT}"
return
end