From 17b513eafba492dcb012df22ca0c9f78e2ef277a Mon Sep 17 00:00:00 2001 From: Christian Williams & Kim Eric Mittler Date: Wed, 2 Sep 2009 12:38:17 -0700 Subject: [PATCH] Switch back to window.eval(xxx) instead of eval(xxx, window) -- arghghgh. --- contrib/ruby/jasmine_runner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ruby/jasmine_runner.rb b/contrib/ruby/jasmine_runner.rb index 26b14931..0a6b3a9c 100644 --- a/contrib/ruby/jasmine_runner.rb +++ b/contrib/ruby/jasmine_runner.rb @@ -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