Skip to content

Commit

Permalink
fixed tests to avoid module function on new Lua versions
Browse files Browse the repository at this point in the history
  • Loading branch information
siffiejoe committed Jan 5, 2015
1 parent 6c66031 commit 04661ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/module2.lua
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 04661ef

Please sign in to comment.