From 48480dcae5323a9200771a5e26ad6206ddd60a21 Mon Sep 17 00:00:00 2001 From: David Given Date: Mon, 10 Jun 2019 16:12:36 +0200 Subject: [PATCH] Fix a tiny ackbuilder bug where you can't set properties to false. --- first/ackbuilder.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/first/ackbuilder.lua b/first/ackbuilder.lua index 81e86b528..616c805d2 100644 --- a/first/ackbuilder.lua +++ b/first/ackbuilder.lua @@ -7,6 +7,7 @@ -- is = { set of rule types which made the target } -- } +local posix = require("posix") local emitter = {} local rules = {} local targets = {} @@ -544,7 +545,7 @@ local function definerule(rulename, types, cb) local args = {} for propname, typespec in pairs(types) do - if not e[propname] then + if e[propname] == nil then if not typespec.optional and (typespec.default == nil) then error(string.format("missing mandatory property '%s'", propname)) end