avm2: Use RegExp.valueOf in RegExp.toString

This fixes flag ordering issues
This commit is contained in:
Lord-McSweeney 2023-04-01 07:34:10 -07:00 committed by Mike Welsh
parent 17ebb8c5bc
commit 58cbc38983
1 changed files with 1 additions and 17 deletions

View File

@ -29,23 +29,7 @@ package {
}
prototype.toString = function():String {
var res:String = "/" + this.source + "/";
if (this.ignoreCase) {
res += "i";
}
if (this.global) {
res += "g";
}
if (this.multiline) {
res += "m";
}
if (this.dotall) {
res += "s";
}
if (this.extended) {
res += "x";
}
return res;
return this.valueOf();
}
prototype.setPropertyIsEnumerable("exec", false);