numeric icon indicating copy to clipboard operation
numeric copied to clipboard

Ensure proper binding for dynamically generated functions.

Open gagern opened this issue 10 years ago • 0 comments

Many places in numeric.js create new functions using the Function(...) constructor. Such functions do not have access to the local scope. Therefore they bind to the global "numeric" object, which might not exist, or might belong to a different version of numeric.js, or might be something different altogether. Since we are careful enough to have a local variable in most places, it appears prudent to make sure that we pass this to functions created from source strings as well.

The code is untested so far.

gagern avatar Feb 16 '15 03:02 gagern