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 r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-07-10 23:39:26 +03:00
committed by Evgeny Gavrin
parent 8aa2571699
commit f8770020f7
3 changed files with 3 additions and 3 deletions
+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)