Skip to content

Commit 57678df

Browse files
authored
Merge pull request #13 from cyanidle/neo
unpack() back/forward compat
2 parents dce5205 + bb83679 commit 57678df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/async.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
--#################### ############ ####################
44

55
local co = coroutine
6-
6+
local unpack = table.unpack or unpack
77

88
-- use with wrap
99
local pong = function (func, callback)
@@ -17,7 +17,7 @@ local pong = function (func, callback)
1717
assert(status, ret)
1818
if co.status(thread) == "dead" then
1919
if (callback) then
20-
(function (_, ...) callback(...) end)(table.unpack(pack))
20+
(function (_, ...) callback(...) end)(unpack(pack))
2121
end
2222
else
2323
assert(type(ret) == "function", "type error :: expected func - coroutine yielded some value")

0 commit comments

Comments
 (0)