diff options
author | Kim Alvefur <zash@zash.se> | 2016-02-22 17:38:46 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-02-22 17:38:46 +0100 |
commit | bf9e8e1406b5383422ed58963f4c2bff648ac6be (patch) | |
tree | 3d77dcf4e5685838f5897bd7a2cfa4a069f2ab01 /util/iterators.lua | |
parent | ae71e17952aca0fb6d9b6461d216a71cd6acb709 (diff) | |
download | prosody-bf9e8e1406b5383422ed58963f4c2bff648ac6be.tar.gz prosody-bf9e8e1406b5383422ed58963f4c2bff648ac6be.zip |
util.iterators: Localize unpack() in Lua 5.2 compatible way
Diffstat (limited to 'util/iterators.lua')
-rw-r--r-- | util/iterators.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/iterators.lua b/util/iterators.lua index aa9c3ec0..e688980b 100644 --- a/util/iterators.lua +++ b/util/iterators.lua @@ -11,7 +11,8 @@ local it = {}; local t_insert = table.insert; -local select, unpack, next = select, unpack, next; +local select, next = select, next; +local unpack = table.unpack or unpack; --luacheck: ignore 113 local function pack(...) return { n = select("#", ...), ... }; end -- Reverse an iterator |