ianb / doctestjs

Javascript testing made easy and explicit
http://ianb.github.io/doctestjs/
MIT License
142 stars 10 forks source link

doctest.js broken on webkit due to invocation of eval with non-window this pointer #8

Closed lloyd closed 13 years ago

lloyd commented 13 years ago

title says it all. Steps to repro? run a sample on google chrome and notice that it fails with the following:

EvalError: The “this” object passed to eval must be the global object from which eval originated.

Nice discussion of the issue here: http://perfectionkills.com/global-eval-what-are-the-options/

ianb commented 13 years ago

Oops, I thought it was a bug report not a pull request. Oh well, I committed the same-ish thing here: https://github.com/ianb/doctestjs/commit/6562a995f65d952e924b079de471cf0ed4d690ff