mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Implement RegExp.prototype.toString() as standalone function
This should not just inherit Object.prototype.toString() (and override Object::to_string()) but be its own function, i.e. 'RegExp.prototype.toString !== Object.prototype.toString'.
This commit is contained in:
parent
41837f548d
commit
e163db248d
Notes:
sideshowbarker
2024-07-19 01:33:58 +09:00
Author: https://github.com/linusg
Commit: e163db248d
Pull-request: https://github.com/SerenityOS/serenity/pull/3938
Reviewed-by: https://github.com/awesomekling
5 changed files with 38 additions and 10 deletions
|
@ -49,9 +49,4 @@ RegExpObject::~RegExpObject()
|
|||
{
|
||||
}
|
||||
|
||||
Value RegExpObject::to_string() const
|
||||
{
|
||||
return js_string(heap(), String::formatted("/{}/{}", content(), flags()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue