[ruby/digest] Fix --without-common-digest
option
In `digest_conf`, "no implicit conversion of false into String" TypeError is raised. https://github.com/ruby/digest/commit/89e5e5fe3a
This commit is contained in:
parent
430789dec4
commit
ba6a36e653
@ -2,16 +2,18 @@
|
||||
|
||||
def digest_conf(name)
|
||||
unless with_config("bundled-#{name}")
|
||||
cc = with_config("common-digest")
|
||||
if cc != false or /\b#{name}\b/ =~ cc
|
||||
if File.exist?("#$srcdir/#{name}cc.h") and
|
||||
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
|
||||
end
|
||||
$objs << "#{name}.#{$OBJEXT}"
|
||||
return
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user