Software /
code /
prosody
Diff
util/iterators.lua @ 7186:9c3930bcbb72
util.iterators: Use table.pack() on Lua 5.2
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 22 Feb 2016 17:43:40 +0100 |
parent | 7184:dedc6bf180e2 |
child | 7257:425bc672d60b |
line wrap: on
line diff
--- a/util/iterators.lua Mon Feb 22 17:40:42 2016 +0100 +++ b/util/iterators.lua Mon Feb 22 17:43:40 2016 +0100 @@ -13,7 +13,7 @@ local t_insert = table.insert; local select, next = select, next; local unpack = table.unpack or unpack; --luacheck: ignore 113 -local function pack(...) return { n = select("#", ...), ... }; end +local pack = table.pack or function (...) return { n = select("#", ...), ... }; end -- Reverse an iterator function it.reverse(f, s, var)