archives

« Bugzilla Issues Index

#1432 — 15.5.4.10, 15.5.4.12: RegExpCreate expects two string-valued parameters


String.prototype.match [15.5.4.10] and String.prototype.search [15.5.4.12] both call RegExpCreate with wrong argument (-types). Change algorithm steps as follows:

> 5.a If regexp is undefined, let p be the empty string; else let p be ToString(regexp).
> 5.b Let rx be the result of the abstract operation RegExpCreate (15.10.4.1) with arguments p and the empty string.


Also change step 8 of [15.5.4.10] and [15.5.4.12] to use proper variable:
> 8. Return the result of Invoke(rx, "match", args).


fixed in rev 15 editor's draft

I centralized the regexp+flags argument coercions within RegExpInit


resolved in rev 15, May 14, 2013 draft