GlitchGames/GGDictionary — pull request #1 by Yonaba (2013-05-26 20:30:44+00:00)
Title: Fix for new() and destroy() methods

I just renamed the local table to `newDict` (instead of self) in the `new()` method. Actually, it was already working fine, but I dit it for code clarity issue. IMHO it is better not to override the reserved word `self`, as the method is actually called with a colon.

Concerning the `destroy` method, when iterating in a table, you cannot delete items assigning `nil` to the key-pairs returned by pairs/ipairs, as they are just values, not references.

```lua
for k,v in pairs(t) do
v = nil
end
````
In the previous example, the assignment `v=nil` is void. To affect nil to each entry in table `t`, one can write instead:

```lua
for k,v in pairs(t) do
t[k] = nil
end
````

Regards,
Roland.