From a1b559a3a269bbee1ae9a33061b08a868ea52f5c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 25 Jan 2019 15:49:29 -0800 Subject: Added metatables for bool, number, function, coroutine. Added run-time check to make sure precompiled code used the same version of Lua. Methods can now be used in (* compiles to *), etc. --- nomsu_environment.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nomsu_environment.lua') diff --git a/nomsu_environment.lua b/nomsu_environment.lua index 0fdf1cf..e359257 100644 --- a/nomsu_environment.lua +++ b/nomsu_environment.lua @@ -131,7 +131,9 @@ nomsu_environment = Importer({ ipairs = ipairs, jit = jit, _VERSION = _VERSION, - bit = (jit or _VERSION == "Lua 5.2") and require('bitops') or nil, + LUA_VERSION = (jit and jit.version or _VERSION), + LUA_API = _VERSION, + Bit = (jit or _VERSION == "Lua 5.2") and require('bitops') or nil, a_List = List, a_Dict = Dict, Text = Text, -- cgit v1.2.3