From 2c4c22ca8191a620d3f689d5b2f5e9023fbdd5cf Mon Sep 17 00:00:00 2001 From: Robert Krimen Date: Sun, 28 Apr 2013 11:10:47 +0200 Subject: [PATCH] eval.length === 1 --- global.go | 2 +- global_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/global.go b/global.go index f8fcb1f..0c1782f 100644 --- a/global.go +++ b/global.go @@ -701,7 +701,7 @@ func newContext() *_runtime { "undefined", UndefinedValue(), "NaN", NaNValue(), "Infinity", positiveInfinityValue(), - "eval", builtinGlobal_eval, + "eval", 1, builtinGlobal_eval, "parseInt", builtinGlobal_parseInt, "parseFloat", builtinGlobal_parseFloat, "isNaN", builtinGlobal_isNaN, diff --git a/global_test.go b/global_test.go index f02b115..a6dfcb7 100644 --- a/global_test.go +++ b/global_test.go @@ -43,6 +43,8 @@ func TestGlobal(t *testing.T) { test(`new Number().constructor == Number`, "true") test(`this.hasOwnProperty`, "[function]") + + test(`eval.length === 1`, "true") } func TestGlobalLength(t *testing.T) {