diff options
author | Waqas Hussain <waqas20@gmail.com> | 2013-05-07 10:41:03 -0400 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2013-05-07 10:41:03 -0400 |
commit | 11684a2d6c54123c73ceeab0d4a66b6dae6b5f09 (patch) | |
tree | 71052985f205b27ca31ac4c11869b733a0a2926a /util | |
parent | 39229adf0ba6bb28743729c952fbb5657a51aff3 (diff) | |
download | prosody-11684a2d6c54123c73ceeab0d4a66b6dae6b5f09.tar.gz prosody-11684a2d6c54123c73ceeab0d4a66b6dae6b5f09.zip |
util.array: Wrap tostring() output in {} (otherwise empty arrays print as "").
Diffstat (limited to 'util')
-rw-r--r-- | util/array.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |