| Index: src/string.js
|
| diff --git a/src/string.js b/src/string.js
|
| index ae65264d4a3ae2c29cc39add829dd45e51ccf0c3..8afd294179b4630d8d73958d6fbb1e39aa46ce6f 100644
|
| --- a/src/string.js
|
| +++ b/src/string.js
|
| @@ -9,11 +9,12 @@
|
| // -------------------------------------------------------------------
|
|
|
| function StringConstructor(x) {
|
| - var value = %_ArgumentsLength() == 0 ? '' : TO_STRING_INLINE(x);
|
| + if (%_ArgumentsLength() == 0) x = '';
|
| if (%_IsConstructCall()) {
|
| - %_SetValueOf(this, value);
|
| + %_SetValueOf(this, TO_STRING_INLINE(x));
|
| } else {
|
| - return value;
|
| + return IS_SYMBOL(x) ?
|
| + %_CallFunction(x, SymbolToString) : TO_STRING_INLINE(x);
|
| }
|
| }
|
|
|
|
|