-
Notifications
You must be signed in to change notification settings - Fork 688
String.prototype.concat() #159
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
String.prototype.concat() #159
Conversation
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.
AFAIK: there is already a magic string for this, we should use that.
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.
Also I think that the ecma_op_to_string correctly returns the "undefined" string if the argument is really undefined. So no need to check the value here.
81a8762 to
4d46c9b
Compare
|
The patch is updated. |
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.
This does not test what you want, because the access of the x will throw the Reference error before the concat was even called
4d46c9b to
ca74ae7
Compare
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.
We would need one more test where the arguments of the concat throws an error when the to_string is called.
ca74ae7 to
4e2a81a
Compare
|
Tests added and the code is fixed, thanks for the feedback. |
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.
This should be an assert instead
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
4e2a81a to
1850cfb
Compare
|
lgtm |
|
Good to me, |
|
Rebase & merged: 72eb14f |
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com