mootools/mootools-core — pull request #2255 by arian (2012-01-25 11:25:31+00:00)
Title: Fix #2251 prototype enumeration

Fix #2251

See commit messages for more info.

Basically what happened is that the native methods were reassigned to make them enumerable with for-in loops.
As #2251 described this made optimizations by Chrome impossible, yielding in a significant performance hit.

The solution creates a `object.forEachMethod(fn)` function that can iterate over each method. The only time this is really necessary is in Element.js when copying array methods onto Elements.