diff --git a/luaunit.lua b/luaunit.lua index 4741478b..bb6cbeec 100755 --- a/luaunit.lua +++ b/luaunit.lua @@ -18,7 +18,7 @@ M.VERSION='3.4' M._VERSION=M.VERSION -- For LuaUnit v2 compatibility -- a version which distinguish between regular Lua and LuaJit -M._LUAVERSION = (jit and jit.version) or _VERSION +M._LUAVERSION = (pcall(function() return(jit.version)end)) and jit.version or _VERSION --[[ Some people like assertEquals( actual, expected ) and some people prefer assertEquals( expected, actual ). @@ -63,7 +63,7 @@ M.FORCE_DEEP_ANALYSIS = true M.DISABLE_DEEP_ANALYSIS = false -- set EXPORT_ASSERT_TO_GLOBALS to have all asserts visible as global values --- EXPORT_ASSERT_TO_GLOBALS = true +local EXPORT_ASSERT_TO_GLOBALS = (pcall(function() return(EXPORT_ASSERT_TO_GLOBALS)end)) and EXPORT_ASSERT_TO_GLOBALS -- we need to keep a copy of the script args before it is overriden local cmdline_argv = rawget(_G, "arg")