Browse Source

Fix length properties on array methods (#1983)

This Pull Request fixes length properties on multiple array prototype methods that were including rest parameters in the count. More tests should pass.

It changes the following:

- Length properties on some array prototype methods
pull/1985/head
lupd 3 years ago
parent
commit
5498a0ea54
  1. 10
      boa_engine/src/builtins/array/mod.rs

10
boa_engine/src/builtins/array/mod.rs

@ -112,14 +112,14 @@ impl BuiltIn for Array {
.method(Self::flat, "flat", 0)
.method(Self::flat_map, "flatMap", 1)
.method(Self::slice, "slice", 2)
.method(Self::some, "some", 2)
.method(Self::some, "some", 1)
.method(Self::sort, "sort", 1)
.method(Self::splice, "splice", 3)
.method(Self::reduce, "reduce", 2)
.method(Self::reduce_right, "reduceRight", 2)
.method(Self::splice, "splice", 2)
.method(Self::reduce, "reduce", 1)
.method(Self::reduce_right, "reduceRight", 1)
.method(Self::keys, "keys", 0)
.method(Self::entries, "entries", 0)
.method(Self::copy_within, "copyWithin", 3)
.method(Self::copy_within, "copyWithin", 2)
// Static Methods
.static_method(Self::from, "from", 1)
.static_method(Self::is_array, "isArray", 1)

Loading…
Cancel
Save