| Index: src/array.js
|
| diff --git a/src/array.js b/src/array.js
|
| index daa75d5753c1bdb0c1659ae5436978501adc7291..4295ba5794e1933b4a9be5fe45c31ceb53578ccf 100644
|
| --- a/src/array.js
|
| +++ b/src/array.js
|
| @@ -465,15 +465,19 @@ function ArrayPush() {
|
| }
|
|
|
|
|
| +// Returns an array containing the array elements of the object followed
|
| +// by the array elements of each argument in order. See ECMA-262,
|
| +// section 15.4.4.7.
|
| function ArrayConcat(arg1) { // length == 1
|
| if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
|
| throw MakeTypeError("called_on_null_or_undefined",
|
| ["Array.prototype.concat"]);
|
| }
|
|
|
| + var array = ToObject(this);
|
| var arg_count = %_ArgumentsLength();
|
| var arrays = new InternalArray(1 + arg_count);
|
| - arrays[0] = this;
|
| + arrays[0] = array;
|
| for (var i = 0; i < arg_count; i++) {
|
| arrays[i + 1] = %_Arguments(i);
|
| }
|
|
|