Checking for _ENV changes does not work for LuaJIT in 5.2 compatability mode since it maintains the getfenv and setfenv functions. rawget(math, 'mod') == nil works to detect 5.2 changes to os.execute that occur in Lua 5.2 and LuaJIT compiled with LUAJIT_ENABLE_LUA52COMPAT.
Checking for _ENV changes does not work for LuaJIT in 5.2 compatability mode since it maintains the getfenv and setfenv functions.
rawget(math, 'mod') == nil
works to detect 5.2 changes to os.execute that occur in Lua 5.2 and LuaJIT compiled withLUAJIT_ENABLE_LUA52COMPAT
.