Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Allow RegExp to String coercion
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
littledan authored and ljharb committed Apr 25, 2017
1 parent 2ba7c85 commit 16caadd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ contributors: Jordan Harband
1. Let _matcher_ be ? GetMethod(_regexp_, @@matchAll).
1. If _matcher_ is not *undefined*, then
1. Return ? Call(_matcher_, _regexp_, « _O_ »).
1. Throw a *TypeError* exception.
1. Let _S_ be ? ToString(_O_).
1. Let _rx_ be ? RegExpCreate(_regexp_, *undefined*).
1. Return ? Invoke(_rx_, @@matchAll, « _S_ »).
</emu-alg>
<emu-note>Similarly to String.prototype.split, String.prototype.matchAll is designed to typically act without mutating its inputs.</emu-note>
</emu-clause>
Expand Down

0 comments on commit 16caadd

Please sign in to comment.