madrobby/keymaster — pull request #70 by smdern (2012-12-25 22:42:59+00:00)
Title: getPressedKeys() should return a clone of _downKeys

getPressedKeys() right now is returning the actual private _downKeys variable. This exposes internal state and is mutable.

The fix will only return a new Array. The test checks to make sure that the #getPressedKeys returns a new array whenever called.