Skip to content

Commit ef6b618

Browse files
moteusmattsta
authored andcommitted
Fix Lua 5.2 compatability by using table.unpack
'unpack' is only on 5.1, in 5.2 it got moved to 'table.unpack' This line gives us the proper 'unpack' based on what's in our global namespace.
1 parent 2820da3 commit ef6b618

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test.lua

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ local cmsgpack = require "cmsgpack"
66
local ok, cmsgpack_safe = pcall(require, 'cmsgpack.safe')
77
if not ok then cmsgpack_safe = nil end
88

9+
local unpack = unpack or table.unpack
10+
911
passed = 0
1012
failed = 0
1113
skipped = 0

0 commit comments

Comments
 (0)