From 25424af5283c7f2453eed0362cec656720c5c833 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Sun, 5 Feb 2023 15:45:10 +0900 Subject: [PATCH] Normative: Don't call @@method for `RegExp` on primitive values --- spec.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec.html b/spec.html index 1328b29b204..32d96eac7d5 100644 --- a/spec.html +++ b/spec.html @@ -33987,7 +33987,7 @@

String.prototype.match ( _regexp_ )

This method performs the following steps when called:

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _regexp_ is neither *undefined* nor *null*, then + 1. If _regexp_ is an Object, then 1. Let _matcher_ be ? GetMethod(_regexp_, @@match). 1. If _matcher_ is not *undefined*, then 1. Return ? Call(_matcher_, _regexp_, « _O_ »). @@ -34007,7 +34007,7 @@

String.prototype.matchAll ( _regexp_ )

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _regexp_ is neither *undefined* nor *null*, then + 1. If _regexp_ is an Object, then 1. Let _isRegExp_ be ? IsRegExp(_regexp_). 1. If _isRegExp_ is *true*, then 1. Let _flags_ be ? Get(_regexp_, *"flags"*). @@ -34130,7 +34130,7 @@

String.prototype.replace ( _searchValue_, _replaceValue_ )

This method performs the following steps when called:

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _searchValue_ is neither *undefined* nor *null*, then + 1. If _searchValue_ is an Object, then 1. Let _replacer_ be ? GetMethod(_searchValue_, @@replace). 1. If _replacer_ is not *undefined*, then 1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »). @@ -34238,7 +34238,7 @@

String.prototype.replaceAll ( _searchValue_, _replaceValue_ )

This method performs the following steps when called:

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _searchValue_ is neither *undefined* nor *null*, then + 1. If _searchValue_ is an Object, then 1. Let _isRegExp_ be ? IsRegExp(_searchValue_). 1. If _isRegExp_ is *true*, then 1. Let _flags_ be ? Get(_searchValue_, *"flags"*). @@ -34282,7 +34282,7 @@

String.prototype.search ( _regexp_ )

This method performs the following steps when called:

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _regexp_ is neither *undefined* nor *null*, then + 1. If _regexp_ is an Object, then 1. Let _searcher_ be ? GetMethod(_regexp_, @@search). 1. If _searcher_ is not *undefined*, then 1. Return ? Call(_searcher_, _regexp_, « _O_ »). @@ -34325,7 +34325,7 @@

String.prototype.split ( _separator_, _limit_ )

It performs the following steps when called:

1. Let _O_ be ? RequireObjectCoercible(*this* value). - 1. If _separator_ is neither *undefined* nor *null*, then + 1. If _separator_ is an Object, then 1. Let _splitter_ be ? GetMethod(_separator_, @@split). 1. If _splitter_ is not *undefined*, then 1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).