projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3a43ca
)
util.set: Fix :include() and :exclude() methods to iterate the input set correctly
author
Matthew Wild
<mwild1@gmail.com>
Mon, 2 Sep 2013 19:52:19 +0000
(20:52 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Mon, 2 Sep 2013 19:52:19 +0000
(20:52 +0100)
util/set.lua
patch
|
blob
|
history
diff --git
a/util/set.lua
b/util/set.lua
index 7f45526eb41f97741cfdabd8abc15f114442a0f1..b9e9ef217c25d4f8d55e37853d0788ee863eb061 100644
(file)
--- 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