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:
committed by
Evgeny Gavrin
parent
8aa2571699
commit
f8770020f7
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user