diff --git a/core/src/avm2/globals/RegExp.as b/core/src/avm2/globals/RegExp.as index 7520e50cd..ae039ee60 100644 --- a/core/src/avm2/globals/RegExp.as +++ b/core/src/avm2/globals/RegExp.as @@ -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);