From def3fc6cd940d413adc04c080b5aa3b40d0d9626 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 7 May 2013 10:41:03 -0400 Subject: util.array: Wrap tostring() output in {} (otherwise empty arrays print as ""). --- util/array.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/array.lua b/util/array.lua index b78fb98f..2d58e7fb 100644 --- a/util/array.lua +++ b/util/array.lua @@ -17,7 +17,7 @@ local tostring = tostring; local array = {}; local array_base = {}; local array_methods = {}; -local array_mt = { __index = array_methods, __tostring = function (array) return array:concat(", "); end }; +local array_mt = { __index = array_methods, __tostring = function (array) return "{"..array:concat(", ").."}"; end }; local function new_array(self, t, _s, _var) if type(t) == "function" then -- Assume iterator -- cgit v1.2.3