Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/xlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSagar M. Waghmare <SW@discoverelement.com>2016-07-19 23:17:16 +0300
committerSagar M. Waghmare <SW@discoverelement.com>2016-07-19 23:17:16 +0300
commit233769fc1dd3657af0911b2c625caebb9420d395 (patch)
treed9843855455b387ba43ea5311a642b648f190d74
parent0dd5f4cf085fde4c8658e29b43b2ab7828dcba33 (diff)
unpack = unpack or table.unpack
-rw-r--r--OptionParser.lua1
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+)=(.*)')