diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:49:29 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-25 15:50:51 -0800 |
| commit | a1b559a3a269bbee1ae9a33061b08a868ea52f5c (patch) | |
| tree | 51f2368c6542efe47dd2a4007ba92e22650236b9 /nomsu_environment.lua | |
| parent | 1713a0e38f12f8ed167575ac5a84a0eb8dd59a44 (diff) | |
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.
Diffstat (limited to 'nomsu_environment.lua')
| -rw-r--r-- | nomsu_environment.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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, |
