Skip to content

Commit cb8bb42

Browse files
committed
Fix issue not running on lua > 5.1
1 parent c87f0cf commit cb8bb42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/prometheus/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ end
252252

253253

254254
local function readonly(obj)
255-
local r = newproxy(true);
255+
local r = newproxy and newproxy(true) or setmetatable({}, {});
256256
getmetatable(r).__index = obj;
257257
return r;
258258
end

0 commit comments

Comments
 (0)