aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-09-02 20:52:19 +0100
committerMatthew Wild <mwild1@gmail.com>2013-09-02 20:52:19 +0100
commit184c3c4cbc44ab918bb8b3cef91e8eff92f86e45 (patch)
treec2dc294a2796b1e8dfd3af3d96a03c89cce8d7e0
parent54de54afd79ac50ee1ca7b939c357c13fd3ec092 (diff)
downloadprosody-184c3c4cbc44ab918bb8b3cef91e8eff92f86e45.tar.gz
prosody-184c3c4cbc44ab918bb8b3cef91e8eff92f86e45.zip
util.set: Fix :include() and :exclude() methods to iterate the input set correctly
-rw-r--r--util/set.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/set.lua b/util/set.lua
index 7f45526e..b9e9ef21 100644
--- a/util/set.lua
+++ b/util/set.lua
@@ -91,13 +91,13 @@ function new(list)
end
function set:include(otherset)
- for item in pairs(otherset) do
+ for item in otherset do
items[item] = true;
end
end
function set:exclude(otherset)
- for item in pairs(otherset) do
+ for item in otherset do
items[item] = nil;
end
end