# HG changeset patch # User Kim Alvefur # Date 1456159420 -3600 # Node ID 9c3930bcbb7221b6c7c7a15a0e3821bd85a8c351 # Parent 5687788a2e4d732fdf129ab0c2bd7d55306371e6 util.iterators: Use table.pack() on Lua 5.2 diff -r 5687788a2e4d -r 9c3930bcbb72 util/iterators.lua --- 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)