Skip to content

Commit 9b254aa

Browse files
committed
Normative: Don't call @@method for RegExp on primitive values
1 parent 0b913e9 commit 9b254aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -35473,7 +35473,7 @@ <h1>String.prototype.match ( _regexp_ )</h1>
3547335473
<p>This method performs the following steps when called:</p>
3547435474
<emu-alg>
3547535475
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35476-
1. If _regexp_ is neither *undefined* nor *null*, then
35476+
1. If _regexp_ is an Object, then
3547735477
1. Let _matcher_ be ? GetMethod(_regexp_, %Symbol.match%).
3547835478
1. If _matcher_ is not *undefined*, then
3547935479
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
@@ -35493,7 +35493,7 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>
3549335493

3549435494
<emu-alg>
3549535495
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35496-
1. If _regexp_ is neither *undefined* nor *null*, then
35496+
1. If _regexp_ is an Object, then
3549735497
1. Let _isRegExp_ be ? IsRegExp(_regexp_).
3549835498
1. If _isRegExp_ is *true*, then
3549935499
1. Let _flags_ be ? Get(_regexp_, *"flags"*).
@@ -35634,7 +35634,7 @@ <h1>String.prototype.replace ( _searchValue_, _replaceValue_ )</h1>
3563435634
<p>This method performs the following steps when called:</p>
3563535635
<emu-alg>
3563635636
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35637-
1. If _searchValue_ is neither *undefined* nor *null*, then
35637+
1. If _searchValue_ is an Object, then
3563835638
1. Let _replacer_ be ? GetMethod(_searchValue_, %Symbol.replace%).
3563935639
1. If _replacer_ is not *undefined*, then
3564035640
1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »).
@@ -35747,7 +35747,7 @@ <h1>String.prototype.replaceAll ( _searchValue_, _replaceValue_ )</h1>
3574735747
<p>This method performs the following steps when called:</p>
3574835748
<emu-alg>
3574935749
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35750-
1. If _searchValue_ is neither *undefined* nor *null*, then
35750+
1. If _searchValue_ is an Object, then
3575135751
1. Let _isRegExp_ be ? IsRegExp(_searchValue_).
3575235752
1. If _isRegExp_ is *true*, then
3575335753
1. Let _flags_ be ? Get(_searchValue_, *"flags"*).
@@ -35791,7 +35791,7 @@ <h1>String.prototype.search ( _regexp_ )</h1>
3579135791
<p>This method performs the following steps when called:</p>
3579235792
<emu-alg>
3579335793
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35794-
1. If _regexp_ is neither *undefined* nor *null*, then
35794+
1. If _regexp_ is an Object, then
3579535795
1. Let _searcher_ be ? GetMethod(_regexp_, %Symbol.search%).
3579635796
1. If _searcher_ is not *undefined*, then
3579735797
1. Return ? Call(_searcher_, _regexp_, « _O_ »).
@@ -35834,7 +35834,7 @@ <h1>String.prototype.split ( _separator_, _limit_ )</h1>
3583435834
<p>It performs the following steps when called:</p>
3583535835
<emu-alg>
3583635836
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35837-
1. If _separator_ is neither *undefined* nor *null*, then
35837+
1. If _separator_ is an Object, then
3583835838
1. Let _splitter_ be ? GetMethod(_separator_, %Symbol.split%).
3583935839
1. If _splitter_ is not *undefined*, then
3584035840
1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).

0 commit comments

Comments
 (0)