Merge pull request #1 from stepelu/fix

Compatibility with strict.lua and other checkers.
This commit is contained in:
Peter Melnichenko
2014-08-01 17:52:18 +04:00

View File

@@ -604,7 +604,8 @@ local function plural(x)
return "s"
end
local default_cmdline = arg or {}
-- Compatibility with strict.lua and other checkers:
local default_cmdline = rawget(_G, "arg") or {}
function Parser:_parse(args, errhandler)
args = args or default_cmdline