Skip to content

Conversation

gagern
Copy link

@gagern gagern commented Feb 16, 2015

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant