From 5498a0ea5492d9acb1a3af49af0724c3de480f5c Mon Sep 17 00:00:00 2001 From: lupd <93457935+lupd@users.noreply.github.com> Date: Tue, 29 Mar 2022 00:17:01 +0000 Subject: [PATCH] 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 --- boa_engine/src/builtins/array/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/boa_engine/src/builtins/array/mod.rs b/boa_engine/src/builtins/array/mod.rs index 33d76ac2f8..38f1c31bde 100644 --- a/boa_engine/src/builtins/array/mod.rs +++ b/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)