-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Implement Symbol.prototype.valueOf
#1618
Conversation
Signed-off-by: hle0 <91701075+hle0@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small detail. Everything else looks good!
boa/src/builtins/symbol/mod.rs
Outdated
// valueOf a symbol is itself | ||
let symbol = Self::this_symbol_value(this, context)?; | ||
Ok(JsValue::Symbol(symbol)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment with the spec steps? Even if it's only a single one :)
Include steps from ECMAScript spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work! We require two approved reviews to merge into master, so in a bit of time this should get merged :)
Symbol.prototype.valueOf
Signed-off-by: hle0 91701075+hle0@users.noreply.github.com
This Pull Request fixes/closes #1617 .
It changes the following:
valueOf
is defined differently forSymbol
so thatSymbol('s').valueOf() == Symbol('s')
, as per the spec.