mirror of
https://github.com/robertkrimen/otto
synced 2025-10-12 20:27:30 +08:00
Fix: Array.isArray.length = 1
This commit is contained in:
parent
81d91501f8
commit
5e8cb6296e
|
@ -331,8 +331,12 @@ func TestArray_isArray(t *testing.T) {
|
|||
|
||||
test := runTest()
|
||||
test(`
|
||||
[ Array.isArray(), Array.isArray([]), Array.isArray({}) ];
|
||||
`, "false,true,false")
|
||||
[ Array.isArray.length, Array.isArray(), Array.isArray([]), Array.isArray({}) ];
|
||||
`, "1,false,true,false")
|
||||
|
||||
test(`
|
||||
[ Array.isArray(Math) ];
|
||||
`, "false")
|
||||
}
|
||||
|
||||
func TestArray_indexOf(t *testing.T) {
|
||||
|
|
2
inline
2
inline
|
@ -264,7 +264,7 @@ sub newContext {
|
|||
1,
|
||||
$self->functionDeclare(
|
||||
$class,
|
||||
"isArray", 0,
|
||||
"isArray", 1,
|
||||
),
|
||||
),
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue
Block a user