1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:37:45 +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:
Linus Groh 2020-11-03 19:39:02 +00:00 committed by Andreas Kling
parent 41837f548d
commit e163db248d
5 changed files with 38 additions and 10 deletions

View file

@ -43,8 +43,6 @@ public:
const String& content() const { return m_content; }
const String& flags() const { return m_flags; }
Value to_string() const override;
private:
virtual bool is_regexp_object() const override { return true; }