WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f9d3b02

Browse files
committed
Normative: Don't call @@method for RegExp on primitive values
1 parent d4927f9 commit f9d3b02

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34113,7 +34113,7 @@ <h1>String.prototype.match ( _regexp_ )</h1>
3411334113
<p>This method performs the following steps when called:</p>
3411434114
<emu-alg>
3411534115
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34116-
1. If _regexp_ is neither *undefined* nor *null*, then
34116+
1. If _regexp_ is an Object, then
3411734117
1. Let _matcher_ be ? GetMethod(_regexp_, @@match).
3411834118
1. If _matcher_ is not *undefined*, then
3411934119
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
@@ -34133,7 +34133,7 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>
3413334133

3413434134
<emu-alg>
3413534135
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34136-
1. If _regexp_ is neither *undefined* nor *null*, then
34136+
1. If _regexp_ is an Object, then
3413734137
1. Let _isRegExp_ be ? IsRegExp(_regexp_).
3413834138
1. If _isRegExp_ is *true*, then
3413934139
1. Let _flags_ be ? Get(_regexp_, *"flags"*).
@@ -34256,7 +34256,7 @@ <h1>String.prototype.replace ( _searchValue_, _replaceValue_ )</h1>
3425634256
<p>This method performs the following steps when called:</p>
3425734257
<emu-alg>
3425834258
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34259-
1. If _searchValue_ is neither *undefined* nor *null*, then
34259+
1. If _searchValue_ is an Object, then
3426034260
1. Let _replacer_ be ? GetMethod(_searchValue_, @@replace).
3426134261
1. If _replacer_ is not *undefined*, then
3426234262
1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »).
@@ -34364,7 +34364,7 @@ <h1>String.prototype.replaceAll ( _searchValue_, _replaceValue_ )</h1>
3436434364
<p>This method performs the following steps when called:</p>
3436534365
<emu-alg>
3436634366
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34367-
1. If _searchValue_ is neither *undefined* nor *null*, then
34367+
1. If _searchValue_ is an Object, then
3436834368
1. Let _isRegExp_ be ? IsRegExp(_searchValue_).
3436934369
1. If _isRegExp_ is *true*, then
3437034370
1. Let _flags_ be ? Get(_searchValue_, *"flags"*).
@@ -34408,7 +34408,7 @@ <h1>String.prototype.search ( _regexp_ )</h1>
3440834408
<p>This method performs the following steps when called:</p>
3440934409
<emu-alg>
3441034410
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34411-
1. If _regexp_ is neither *undefined* nor *null*, then
34411+
1. If _regexp_ is an Object, then
3441234412
1. Let _searcher_ be ? GetMethod(_regexp_, @@search).
3441334413
1. If _searcher_ is not *undefined*, then
3441434414
1. Return ? Call(_searcher_, _regexp_, « _O_ »).
@@ -34451,7 +34451,7 @@ <h1>String.prototype.split ( _separator_, _limit_ )</h1>
3445134451
<p>It performs the following steps when called:</p>
3445234452
<emu-alg>
3445334453
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34454-
1. If _separator_ is neither *undefined* nor *null*, then
34454+
1. If _separator_ is an Object, then
3445534455
1. Let _splitter_ be ? GetMethod(_separator_, @@split).
3445634456
1. If _splitter_ is not *undefined*, then
3445734457
1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).

0 commit comments

Comments
 (0)