stevedonovan / Lake

A Lua-based Build Tool
MIT License
132 stars 16 forks source link

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

Open cehoffman opened 11 years ago

cehoffman commented 11 years ago

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.

stevedonovan commented 11 years ago

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.