1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00

eval.length === 1

This commit is contained in:
Robert Krimen 2013-04-28 11:10:47 +02:00
parent cc112ca544
commit 2c4c22ca81
2 changed files with 3 additions and 1 deletions

View File

@ -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,

View File

@ -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) {