Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: Specify String.prototype.replace edge case #853

Merged
merged 2 commits into from
Mar 31, 2017

Conversation

littledan
Copy link
Member

In RegExp.prototype[Symbol.replace] as applied to RegExps, if a
substitution string is used with a numerical group reference which
is out of bounds, the behavior was previously implementation-defined.
This patch changes the behavior to not do a replacement.
Testing with eshost showed that V8, SpiderMonkey, JSC and ChakraCore
all agree on these semantics.

In RegExp.prototype[Symbol.replace] as applied to RegExps, if a
substitution string is used with a numerical group reference which
is out of bounds, the behavior was previously implementation-defined.
This patch changes the behavior to not do a replacement.
Testing with eshost showed that V8, SpiderMonkey, JSC and ChakraCore
all agree on these semantics.
@littledan littledan added needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text web reality labels Mar 20, 2017
@bterlson
Copy link
Member

I guess technically needs-consensus? I can talk about it as part of my item if you like.

@bterlson bterlson added the needs consensus This needs committee consensus before it can be eligible to be merged. label Mar 20, 2017
littledan added a commit to littledan/test262 that referenced this pull request Mar 21, 2017
In tc39/ecma262#853 , standard semantics
for this case are proposed. This patch tests the case.
@littledan littledan removed the needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 label Mar 22, 2017
@leobalter
Copy link
Member

this reached consensus in March 22nd at the last TC39 meeting.

@leobalter leobalter removed the needs consensus This needs committee consensus before it can be eligible to be merged. label Mar 27, 2017
leobalter pushed a commit to tc39/test262 that referenced this pull request Mar 27, 2017
In tc39/ecma262#853 , standard semantics
for this case are proposed. This patch tests the case.
@ljharb ljharb added the has consensus This has committee consensus. label Mar 27, 2017
@bterlson bterlson merged commit 4beed20 into tc39:master Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text web reality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants