File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1212local oldPkgPath = package.path ;
1313package.path = script_path () .. " ?.lua;" .. package.path ;
1414
15- -- Math.random Fix
15+ -- Math.random Fix for Lua5.1
1616-- Check if fix is needed
1717if not pcall (function ()
1818 return math.random (1 , 2 ^ 40 );
@@ -38,6 +38,14 @@ end) then
3838 end
3939end
4040
41+ -- newproxy polyfill
42+ _G .newproxy = _G .newproxy or function (arg )
43+ if arg then
44+ return setmetatable ({}, {});
45+ end
46+ return {};
47+ end
48+
4149
4250-- Require Prometheus Submodules
4351local Pipeline = require (" prometheus.pipeline" );
Original file line number Diff line number Diff line change 243243
244244
245245local function readonly (obj )
246- local r = newproxy and newproxy (true ) or setmetatable ({}, {} );
246+ local r = newproxy (true );
247247 getmetatable (r ).__index = obj ;
248248 return r ;
249249end
You can’t perform that action at this time.
0 commit comments