Skip to content

Commit

Permalink
Normative: Don't call @@method for RegExp on primitive values
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Mar 2, 2023
1 parent c4a8bd4 commit 25424af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -33987,7 +33987,7 @@ <h1>String.prototype.match ( _regexp_ )</h1>
<p>This method performs the following steps when called:</p>
<emu-alg>
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_ »).
Expand All @@ -34007,7 +34007,7 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>

<emu-alg>
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"*).
Expand Down Expand Up @@ -34130,7 +34130,7 @@ <h1>String.prototype.replace ( _searchValue_, _replaceValue_ )</h1>
<p>This method performs the following steps when called:</p>
<emu-alg>
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_ »).
Expand Down Expand Up @@ -34238,7 +34238,7 @@ <h1>String.prototype.replaceAll ( _searchValue_, _replaceValue_ )</h1>
<p>This method performs the following steps when called:</p>
<emu-alg>
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"*).
Expand Down Expand Up @@ -34282,7 +34282,7 @@ <h1>String.prototype.search ( _regexp_ )</h1>
<p>This method performs the following steps when called:</p>
<emu-alg>
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_ »).
Expand Down Expand Up @@ -34325,7 +34325,7 @@ <h1>String.prototype.split ( _separator_, _limit_ )</h1>
<p>It performs the following steps when called:</p>
<emu-alg>
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_ »).
Expand Down

0 comments on commit 25424af

Please sign in to comment.