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
2015-07-13 19:05:37 +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)