diff --git a/test/built-ins/RegExp/named-groups/groups-object-subclass-sans.js b/test/built-ins/RegExp/named-groups/groups-object-subclass-sans.js index 58a1458d81c8d303d8bdbf9bf90e087a70904894..7a69b281d8f12255dd07fe0c0d99456c36099ae5 100644 --- a/test/built-ins/RegExp/named-groups/groups-object-subclass-sans.js +++ b/test/built-ins/RegExp/named-groups/groups-object-subclass-sans.js @@ -27,11 +27,11 @@ class FakeRegExp extends RegExp { const re = new FakeRegExp(); const result = re.exec("ab"); -assert.sameValue(result.__proto__, Array.prototype); +assert.sameValue(Object.getPrototypeOf(result), Array.prototype); assert.sameValue(false, result.hasOwnProperty("groups")); Array.prototype.groups = { a: "b" }; -Array.prototype.groups.__proto__.b = "c"; +Object.getPrototypeOf(Array.prototype.groups).b = "c"; assert.sameValue("b", "ab".replace(re, "$<a>")); assert.sameValue("c", "ab".replace(re, "$<b>")); Array.prototype.groups = undefined; diff --git a/test/built-ins/RegExp/named-groups/groups-object-subclass.js b/test/built-ins/RegExp/named-groups/groups-object-subclass.js index af5d02f28c8ec7043ab061a56eaea52aae4071c0..968e7c153ecb773a929376b0935742eb868fd369 100644 --- a/test/built-ins/RegExp/named-groups/groups-object-subclass.js +++ b/test/built-ins/RegExp/named-groups/groups-object-subclass.js @@ -21,14 +21,14 @@ class FakeRegExp extends RegExp { const fakeResult = ["ab", "a"]; fakeResult.index = 0; fakeResult.groups = { a: "b" }; - fakeResult.groups.__proto__.b = "c"; + Object.getPrototypeOf(fakeResult.groups).b = "c"; return fakeResult; } }; const re = new FakeRegExp(); const result = re.exec("ab"); -assert.sameValue(result.__proto__, Array.prototype); +assert.sameValue(Object.getPrototypeOf(result), Array.prototype); assert(result.hasOwnProperty("groups")); assert.sameValue("b", result.groups.a); assert.sameValue("b", "ab".replace(re, "$<a>")); diff --git a/test/built-ins/RegExp/named-groups/groups-object-undefined.js b/test/built-ins/RegExp/named-groups/groups-object-undefined.js index 76a8fa5e6830018fd88083ff335c310761b5eee3..fea8fd0bface535a95c4fc3578f3f1c5ed9123e3 100644 --- a/test/built-ins/RegExp/named-groups/groups-object-undefined.js +++ b/test/built-ins/RegExp/named-groups/groups-object-undefined.js @@ -17,7 +17,7 @@ info: | const re = /./; const result = re.exec("a"); -assert.sameValue(result.__proto__, Array.prototype); +assert.sameValue(Object.getPrototypeOf(result), Array.prototype); assert(result.hasOwnProperty("groups")); assert.sameValue("a", result[0]); assert.sameValue(0, result.index); diff --git a/test/built-ins/RegExp/named-groups/groups-object-unmatched.js b/test/built-ins/RegExp/named-groups/groups-object-unmatched.js index 610d205e81863680fc96f64369b3e885de3b5a86..2c7dc53c3b61d53e5c3aba6674f483331b585368 100644 --- a/test/built-ins/RegExp/named-groups/groups-object-unmatched.js +++ b/test/built-ins/RegExp/named-groups/groups-object-unmatched.js @@ -18,7 +18,7 @@ info: | const re = /(?<a>a).|(?<x>x)/; const result = re.exec("ab"); -assert.sameValue(result.__proto__, Array.prototype); +assert.sameValue(Object.getPrototypeOf(result), Array.prototype); assert(result.hasOwnProperty("groups")); assert.sameValue("ab", result[0]); assert.sameValue("a", result[1]);