Skip to content

Commit ca31671

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

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
@@ -33992,7 +33992,7 @@ <h1>String.prototype.match ( _regexp_ )</h1>
3399233992
<p>This method performs the following steps when called:</p>
3399333993
<emu-alg>
3399433994
1. Let _O_ be ? RequireObjectCoercible(*this* value).
33995-
1. If _regexp_ is neither *undefined* nor *null*, then
33995+
1. If _regexp_ is an Object, then
3399633996
1. Let _matcher_ be ? GetMethod(_regexp_, @@match).
3399733997
1. If _matcher_ is not *undefined*, then
3399833998
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
@@ -34012,7 +34012,7 @@ <h1>String.prototype.matchAll ( _regexp_ )</h1>
3401234012

3401334013
<emu-alg>
3401434014
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34015-
1. If _regexp_ is neither *undefined* nor *null*, then
34015+
1. If _regexp_ is an Object, then
3401634016
1. Let _isRegExp_ be ? IsRegExp(_regexp_).
3401734017
1. If _isRegExp_ is *true*, then
3401834018
1. Let _flags_ be ? Get(_regexp_, *"flags"*).
@@ -34135,7 +34135,7 @@ <h1>String.prototype.replace ( _searchValue_, _replaceValue_ )</h1>
3413534135
<p>This method performs the following steps when called:</p>
3413634136
<emu-alg>
3413734137
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34138-
1. If _searchValue_ is neither *undefined* nor *null*, then
34138+
1. If _searchValue_ is an Object, then
3413934139
1. Let _replacer_ be ? GetMethod(_searchValue_, @@replace).
3414034140
1. If _replacer_ is not *undefined*, then
3414134141
1. Return ? Call(_replacer_, _searchValue_, « _O_, _replaceValue_ »).
@@ -34243,7 +34243,7 @@ <h1>String.prototype.replaceAll ( _searchValue_, _replaceValue_ )</h1>
3424334243
<p>This method performs the following steps when called:</p>
3424434244
<emu-alg>
3424534245
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34246-
1. If _searchValue_ is neither *undefined* nor *null*, then
34246+
1. If _searchValue_ is an Object, then
3424734247
1. Let _isRegExp_ be ? IsRegExp(_searchValue_).
3424834248
1. If _isRegExp_ is *true*, then
3424934249
1. Let _flags_ be ? Get(_searchValue_, *"flags"*).
@@ -34287,7 +34287,7 @@ <h1>String.prototype.search ( _regexp_ )</h1>
3428734287
<p>This method performs the following steps when called:</p>
3428834288
<emu-alg>
3428934289
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34290-
1. If _regexp_ is neither *undefined* nor *null*, then
34290+
1. If _regexp_ is an Object, then
3429134291
1. Let _searcher_ be ? GetMethod(_regexp_, @@search).
3429234292
1. If _searcher_ is not *undefined*, then
3429334293
1. Return ? Call(_searcher_, _regexp_, « _O_ »).
@@ -34330,7 +34330,7 @@ <h1>String.prototype.split ( _separator_, _limit_ )</h1>
3433034330
<p>It performs the following steps when called:</p>
3433134331
<emu-alg>
3433234332
1. Let _O_ be ? RequireObjectCoercible(*this* value).
34333-
1. If _separator_ is neither *undefined* nor *null*, then
34333+
1. If _separator_ is an Object, then
3433434334
1. Let _splitter_ be ? GetMethod(_separator_, @@split).
3433534335
1. If _splitter_ is not *undefined*, then
3433634336
1. Return ? Call(_splitter_, _separator_, « _O_, _limit_ »).

0 commit comments

Comments
 (0)