Switch back to window.eval(xxx) instead of eval(xxx, window) -- arghghgh.

This commit is contained in:
Christian Williams & Kim Eric Mittler 2009-09-02 12:38:17 -07:00
parent ca6b23684e
commit 17b513eafb

View File

@ -170,7 +170,7 @@ module Jasmine
def eval_js(script)
escaped_script = "'" + script.gsub(/(['\\])/) { '\\' + $1 } + "'"
result = @driver.get_eval("eval(#{escaped_script}, window)")
result = @driver.get_eval("window.eval(#{escaped_script})")
JSON.parse("[#{result}]")[0]
end
end