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

[spec] GetStringForBinaryEncoding: ensure that only a string is returned #24

Merged
merged 1 commit into from May 24, 2023

Conversation

ljharb
Copy link
Member

@ljharb ljharb commented May 24, 2023

As written, an object can return a non-string which will be stringified, which seems to contradict the intention of the NOTE.

This change ensures that it throws if the object ToPrimitives to a non-string as well.

@ljharb ljharb requested a review from bakkot May 24, 2023 06:02
@ljharb ljharb force-pushed the GetStringForBinaryEncoding branch from 15b8223 to 9152073 Compare May 24, 2023 06:04
@bakkot
Copy link
Collaborator

bakkot commented May 24, 2023

Works for me, though I'm not super concerned about that case coming up in real life.

@bakkot bakkot merged commit 9538fcf into main May 24, 2023
1 check passed
@bakkot bakkot deleted the GetStringForBinaryEncoding branch May 24, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants