« Bugzilla Issues Index

#1432 —, RegExpCreate expects two string-valued parameters

String.prototype.match [] and [] 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 ( with arguments p and the empty string.

Also change step 8 of [] and [] 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