Update Symbol.split functions for String and Regexp to match new standard (#3942)
In newest ES standard limit parameter is calculated using ToUint32 function instead of ToLength. JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
This commit is contained in:
@@ -107,3 +107,14 @@ try {
|
||||
} catch (e) {
|
||||
assert (e === "abrupt capture");
|
||||
}
|
||||
|
||||
Object.defineProperty(RegExp.prototype, "exec", { value: function (str) {
|
||||
this.lastIndex = 10;
|
||||
return { };
|
||||
}});
|
||||
|
||||
var result = split.call ({flags: "g"}, "string");
|
||||
|
||||
assert(result.length === 2)
|
||||
assert(result[0] === "")
|
||||
assert(result[1] === "")
|
||||
|
||||
Reference in New Issue
Block a user