util.set: Fix :include() and :exclude() methods to iterate the input set correctly
authorMatthew Wild <mwild1@gmail.com>
Mon, 2 Sep 2013 19:52:19 +0000 (20:52 +0100)
committerMatthew Wild <mwild1@gmail.com>
Mon, 2 Sep 2013 19:52:19 +0000 (20:52 +0100)
util/set.lua

index 7f45526eb41f97741cfdabd8abc15f114442a0f1..b9e9ef217c25d4f8d55e37853d0788ee863eb061 100644 (file)
@@ -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