Lake icon indicating copy to clipboard operation
Lake copied to clipboard

Lua 5.2 check doesn't work for LuaJIT in 5.2 Compatability

Open cehoffman opened this issue 12 years ago • 1 comments

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.

cehoffman avatar Feb 18 '13 05:02 cehoffman

Thanks man, this happened because I was testing against a strict 5.2 executable.

Would be cool if the 'lua' need meant 'link against Lua 5.2' if that was the Lua installed.

stevedonovan avatar Feb 18 '13 07:02 stevedonovan