No longer using eval on assert operator #386 #395

Merged
merged 1 commit into from Mar 8, 2015

Projects

None yet

2 participants

@cjqed
Contributor
cjqed commented Mar 8, 2015

This pull request fixes issue #386 . The use of eval has gone away, and has been replaced with a switch operator on all possible boolean operators. I moved the error to the default case of the switch statement, as this avoids the unnecessary check in the beginning (and so that if more operators were added in the future, you wouldn't have to remember to add it in both places).

@keithamus
Member

Sweet! Nice work @cjqed!

@keithamus keithamus merged commit 83a9e56 into chaijs:master Mar 8, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment