|
It also misses detection of LuaJIT’s 5.2 compatibility flag
>> --[=[
>> local version = 'Lua 5.0'
>> --[[]=]
>> local n = '8'; repeat n = n*n until n == n*n
>> local t = {'Lua 5.1', nil,
>> [-1/0] = 'Lua 5.2',
>> [1/0] = 'Lua 5.3',
>> [2] = 'LuaJIT'}
>> local version = t[2] or t[#'\z'] or t[n/'-0'] or 'Lua 5.4'
>> --]]