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 Nov 26, 2024
1 parent cf5938e commit c45ae45
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 @@ -35035,7 +35035,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_, %Symbol.match%).
1. If _matcher_ is not *undefined*, then
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
Expand All @@ -35055,7 +35055,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 @@ -35196,7 +35196,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_, %Symbol.replace%).
1. If _replacer_ is not *undefined*, then
1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »).
Expand Down Expand Up @@ -35309,7 +35309,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 @@ -35353,7 +35353,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_, %Symbol.search%).
1. If _searcher_ is not *undefined*, then
1. Return ? Call(_searcher_, _regexp_, « _O_ »).
Expand Down Expand Up @@ -35396,7 +35396,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_, %Symbol.split%).
1. If _splitter_ is not *undefined*, then
1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).
Expand Down

0 comments on commit c45ae45

Please sign in to comment.