Files
ladybird/Libraries/LibJS/Runtime
Linus Groh da0ab16f01 LibJS: Don't handle arrays separately in Value::to_number()
Now that Array.prototype.join() is producing the correct results we
can remove the separate code path for arrays in Value::to_number()
and treat them like all other objects - using to_primitive() with
number as the preferred type and then calling to_number() on the
result.

This is how the spec descibes it.

This also means we don't crash anymore when trying to coerce
[<empty>] to a number - it now does the following:

[<empty>] - to string - "" - to number - 0
[<empty>, <empty>] - to string - "," - to number - NaN
2020-04-29 01:30:59 +02:00
..
2020-04-23 09:47:23 +02:00
2020-04-23 09:47:23 +02:00
2020-04-23 11:03:42 +02:00
2020-04-23 19:38:13 +02:00
2020-04-28 15:07:08 +02:00
2020-04-28 15:07:08 +02:00
2020-04-26 13:53:05 +02:00