diff --git a/array.lua b/array.lua index 21ad266..5f77df9 100644 --- a/array.lua +++ b/array.lua @@ -169,11 +169,17 @@ array = { raises_error(array, obj, 'concat') raises_error(array, obj2, 'concat') + local output = {} + + for i=1, #obj do + table.insert(output, obj[i]) + end + for i=1, #obj2 do - table.insert(obj, obj2[i]) + table.insert(output, obj2[i]) end - return obj + return output end, uniq = function(obj)