diff options
author | Sagar M. Waghmare <SW@discoverelement.com> | 2016-07-19 23:17:16 +0300 |
---|---|---|
committer | Sagar M. Waghmare <SW@discoverelement.com> | 2016-07-19 23:17:16 +0300 |
commit | 233769fc1dd3657af0911b2c625caebb9420d395 (patch) | |
tree | d9843855455b387ba43ea5311a642b648f190d74 | |
parent | 0dd5f4cf085fde4c8658e29b43b2ab7828dcba33 (diff) |
unpack = unpack or table.unpack
-rw-r--r-- | OptionParser.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OptionParser.lua b/OptionParser.lua index 11379dd..facad43 100644 --- a/OptionParser.lua +++ b/OptionParser.lua @@ -72,6 +72,7 @@ function OptionParser:parse(options) options.__main__ = true -- python like main -- expand options (e.g. "--input=file" -> "--input", "file") + local unpack = unpack or table.unpack local arg = {unpack(arg)} for i=#arg,1,-1 do local v = arg[i] local flag, val = v:match('^(%-%-%w+)=(.*)') |