From 0b797d0d335dbea53f5ada06ec9a0b8f6fa6f7e7 Mon Sep 17 00:00:00 2001 From: RageKnify Date: Tue, 29 Sep 2020 21:03:48 +0100 Subject: [PATCH] Fix: Fix output of Object.toString(), closes boa-dev/boa#729 --- boa/src/builtins/object/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boa/src/builtins/object/mod.rs b/boa/src/builtins/object/mod.rs index 7e488e1b26..acb1ffee79 100644 --- a/boa/src/builtins/object/mod.rs +++ b/boa/src/builtins/object/mod.rs @@ -115,9 +115,9 @@ impl Object { /// [spec]: https://tc39.es/ecma262/#sec-object.prototype.tostring /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString #[allow(clippy::wrong_self_convention)] - pub fn to_string(this: &Value, _: &[Value], _: &mut Context) -> Result { + pub fn to_string(_: &Value, _: &[Value], _: &mut Context) -> Result { // FIXME: it should not display the object. - Ok(this.display().to_string().into()) + Ok("[object Object]".into()) } /// `Object.prototype.hasOwnPrototype( property )`