Software /
code /
prosody
Diff
util/set.lua @ 5813:c888f548876b
util.set: Fix :include() and :exclude() methods to iterate the input set correctly
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 02 Sep 2013 20:52:19 +0100 |
parent | 4908:8c5b5ebaacb0 |
child | 5814:5cf1c08805fb |
child | 5906:071a7e461ae7 |
line wrap: on
line diff
--- a/util/set.lua Mon Sep 02 18:19:38 2013 +0200 +++ b/util/set.lua Mon Sep 02 20:52:19 2013 +0100 @@ -91,13 +91,13 @@ 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