From 04661ef490139e33e5c169353be860fa63fd4f20 Mon Sep 17 00:00:00 2001 From: Philipp Janda Date: Mon, 5 Jan 2015 01:34:48 +0100 Subject: [PATCH] fixed tests to avoid module function on new Lua versions --- tests/module2.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/module2.lua b/tests/module2.lua index 73c8682..ad08740 100644 --- a/tests/module2.lua +++ b/tests/module2.lua @@ -1,4 +1,10 @@ -module( "module2" ) +if _VERSION == "Lua 5.1" then + module( "module2" ) +else + local _M = {} + package.loaded[ "module2" ] = _M + _ENV = _M +end function func() return "module2"