aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/array.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/array.lua b/util/array.lua
index 1a8ffec7..4eb10f22 100644
--- a/util/array.lua
+++ b/util/array.lua
@@ -21,6 +21,8 @@ local array_base = {};
local array_methods = {};
local array_mt = { __index = array_methods, __name = "array", __tostring = function (self) return "{"..self:concat(", ").."}"; end };
+function array_mt:__freeze() return self; end
+
local function new_array(self, t, _s, _var)
if type(t) == "function" then -- Assume iterator
t = self.collect(t, _s, _var);