[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)
|
def digest_conf(name)
|
||||||
unless with_config("bundled-#{name}")
|
unless with_config("bundled-#{name}")
|
||||||
cc = with_config("common-digest")
|
case cc = with_config("common-digest", true)
|
||||||
if cc != false or /\b#{name}\b/ =~ cc
|
when true, false
|
||||||
if File.exist?("#$srcdir/#{name}cc.h") and
|
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")
|
have_header("CommonCrypto/CommonDigest.h")
|
||||||
$defs << "-D#{name.upcase}_USE_COMMONDIGEST"
|
$defs << "-D#{name.upcase}_USE_COMMONDIGEST"
|
||||||
$headers << "#{name}cc.h"
|
$headers << "#{name}cc.h"
|
||||||
return :commondigest
|
return :commondigest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
$objs << "#{name}.#{$OBJEXT}"
|
$objs << "#{name}.#{$OBJEXT}"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user