From 13eee71839728e00b31b8a474ce78724982b5417 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Mon, 28 Sep 2015 14:08:07 -0400 Subject: [PATCH] compat: fixes unpack calls to lookup table.unpack before the 5.2-deprecated/removed unpack --- lua/json/decode/state.lua | 2 +- tests/lunit-encoderfunc.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/json/decode/state.lua b/lua/json/decode/state.lua index 50556f8..693d5df 100644 --- a/lua/json/decode/state.lua +++ b/lua/json/decode/state.lua @@ -8,7 +8,7 @@ local jsonutil = require("json.util") local assert = assert local type = type local next = next -local unpack = unpack +local unpack = require("table").unpack or unpack local _ENV = nil diff --git a/tests/lunit-encoderfunc.lua b/tests/lunit-encoderfunc.lua index 9606c65..f265d76 100644 --- a/tests/lunit-encoderfunc.lua +++ b/tests/lunit-encoderfunc.lua @@ -2,6 +2,7 @@ local json = require("json") local lunit = require("lunit") local math = require("math") local testutil = require("testutil") +local unpack = require("table").unpack or unpack local setmetatable = setmetatable -- 2.11.4.GIT