- fixed RegExp.toString so 3 more Mozilla regexp tests pass
* kjs/regexp_object.cpp: (RegExpProtoFuncImp::call):
Append the flags here so more tests paseed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7178
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-08-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Ken.
+
+ - fixed RegExp.toString so 3 more Mozilla regexp tests pass
+
+ * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call):
+ Append the flags here so more tests paseed.
+
2004-08-02 Darin Adler <darin@apple.com>
Reviewed by Ken.
str = "/";
str += s.value();
str += "/";
- // TODO append the flags
+ if (thisObj.get(exec,"global").toBoolean(exec)) {
+ str += "g";
+ }
+ if (thisObj.get(exec,"ignoreCase").toBoolean(exec)) {
+ str += "i";
+ }
+ if (thisObj.get(exec,"multiline").toBoolean(exec)) {
+ str += "m";
+ }
return String(str);
}