Update RegExp.prototype.exec so that it returns 'null' instead of 'undefined' in case argument doesn't match corresponding regular expression.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
This commit is contained in:
Ruben Ayrapetyan authored and Evgeny Gavrin committed 2015-07-13 19:05:37 +03:00
1 parent 8aa2571699
commit f8770020f7
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ var r;
r = new RegExp ("a");
assert (r.exec ("a") == "a");
assert (r.exec ("b") == undefined);
assert (r.exec ("b") == null);
try {
r.exec.call({}, "a");
assert (false)