Skip to content

Commit c45ae45

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

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
@@ -35035,7 +35035,7 @@ <h1>String.prototype.match ( _regexp_ )</h1>
3503535035
<p>This method performs the following steps when called:</p>
3503635036
<emu-alg>
3503735037
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35038-
1. If _regexp_ is neither *undefined* nor *null*, then
35038+
1. If _regexp_ is an Object, then
3503935039
1. Let _matcher_ be ? GetMethod(_regexp_, %Symbol.match%).
3504035040
1. If _matcher_ is not *undefined*, then
3504135041
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
@@ -35055,7 +35055,7 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>
3505535055

3505635056
<emu-alg>
3505735057
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35058-
1. If _regexp_ is neither *undefined* nor *null*, then
35058+
1. If _regexp_ is an Object, then
3505935059
1. Let _isRegExp_ be ? IsRegExp(_regexp_).
3506035060
1. If _isRegExp_ is *true*, then
3506135061
1. Let _flags_ be ? Get(_regexp_, *"flags"*).
@@ -35196,7 +35196,7 @@ <h1>String.prototype.replace ( _searchValue_, _replaceValue_ )</h1>
3519635196
<p>This method performs the following steps when called:</p>
3519735197
<emu-alg>
3519835198
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35199-
1. If _searchValue_ is neither *undefined* nor *null*, then
35199+
1. If _searchValue_ is an Object, then
3520035200
1. Let _replacer_ be ? GetMethod(_searchValue_, %Symbol.replace%).
3520135201
1. If _replacer_ is not *undefined*, then
3520235202
1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »).
@@ -35309,7 +35309,7 @@ <h1>String.prototype.replaceAll ( _searchValue_, _replaceValue_ )</h1>
3530935309
<p>This method performs the following steps when called:</p>
3531035310
<emu-alg>
3531135311
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35312-
1. If _searchValue_ is neither *undefined* nor *null*, then
35312+
1. If _searchValue_ is an Object, then
3531335313
1. Let _isRegExp_ be ? IsRegExp(_searchValue_).
3531435314
1. If _isRegExp_ is *true*, then
3531535315
1. Let _flags_ be ? Get(_searchValue_, *"flags"*).
@@ -35353,7 +35353,7 @@ <h1>String.prototype.search ( _regexp_ )</h1>
3535335353
<p>This method performs the following steps when called:</p>
3535435354
<emu-alg>
3535535355
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35356-
1. If _regexp_ is neither *undefined* nor *null*, then
35356+
1. If _regexp_ is an Object, then
3535735357
1. Let _searcher_ be ? GetMethod(_regexp_, %Symbol.search%).
3535835358
1. If _searcher_ is not *undefined*, then
3535935359
1. Return ? Call(_searcher_, _regexp_, « _O_ »).
@@ -35396,7 +35396,7 @@ <h1>String.prototype.split ( _separator_, _limit_ )</h1>
3539635396
<p>It performs the following steps when called:</p>
3539735397
<emu-alg>
3539835398
1. Let _O_ be ? RequireObjectCoercible(*this* value).
35399-
1. If _separator_ is neither *undefined* nor *null*, then
35399+
1. If _separator_ is an Object, then
3540035400
1. Let _splitter_ be ? GetMethod(_separator_, %Symbol.split%).
3540135401
1. If _splitter_ is not *undefined*, then
3540235402
1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).

0 commit comments

Comments
 (0)