archives

« Bugzilla Issues Index

#2779 — 21.2.5.7 RegExp.prototype.replace: Don't call ToString() if captured group is undefined


21.2.5.7 RegExp.prototype.replace ( string, replaceValue ), step 17.h.i:

Step 17.h.i needs to preserve `undefined` as the captured group value.

Change to:

> Let capN be the result of Get(result, ToString(n)).
> If Type(capN) is not Undefined, then let capN be ToString(capN).


fixed in rev25 editor's draft


fixed in rev25 editor's draft