Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obj.toString() should be "[object Object]" S8.6.2_A3 #729

Closed
jasonwilliams opened this issue Sep 28, 2020 · 1 comment · Fixed by #737
Closed

obj.toString() should be "[object Object]" S8.6.2_A3 #729

jasonwilliams opened this issue Sep 28, 2020 · 1 comment · Fixed by #737
Assignees
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics E-Easy Easy good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Milestone

Comments

@jasonwilliams
Copy link
Member

During Test262 we have https://github.com/tc39/test262/blob/master/test/language/types/object/S8.6.2_A3.js failing.
You can test this by setting your js file to...

let obj = {};
obj.toString();

The output should be "[object Object]"

The issue here is we're using the internal display rather than what the JS developer should be seeing.
https://github.com/boa-dev/boa/blob/master/boa/src/builtins/object/mod.rs#L120 could be changed to "[object Object]"

We will need to implement a way for us to debug the insides of objects, but this should be left to another method, like print() etc

Contributing: https://github.com/boa-dev/boa/blob/master/CONTRIBUTING.md
Debugging: https://github.com/boa-dev/boa/blob/master/docs/debugging.md

@jasonwilliams jasonwilliams added bug Something isn't working good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com E-Easy Easy labels Sep 28, 2020
@RageKnify
Copy link
Contributor

The insides of objects can still be seen normally, this only changes the output of this method. I'll open a PR ASAP.

RageKnify added a commit to RageKnify/boa that referenced this issue Sep 29, 2020
RageKnify added a commit to RageKnify/boa that referenced this issue Sep 29, 2020
@Razican Razican added this to the v0.11.0 milestone Sep 30, 2020
@Razican Razican added the builtins PRs and Issues related to builtins/intrinsics label Sep 30, 2020
@HalidOdat HalidOdat modified the milestones: v0.11.0, v0.10.0 Oct 1, 2020
otravidaahora2t added a commit to otravidaahora2t/boa that referenced this issue Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics E-Easy Easy good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants