diff --git a/index.html b/index.html
index dea4135..9df3d16 100644
--- a/index.html
+++ b/index.html
@@ -2211,7 +2211,7 @@
-
Stage 3 Draft / February 27, 2018
+
Stage 3 Draft / March 5, 2018
String.prototype.matchAll
@@ -2267,7 +2267,7 @@ 5The %RegExpStringIteratorPrototype% Object
5.1%RegExpStringIteratorPrototype%.next ( )
- - Let O be the this value.
- If Type(O) is not Object, throw a TypeError exception.
- If O does not have all of the internal slots of a RegExp String Iterator Object Instance (see 5.3), throw a TypeError exception.
- If O.[[Done]] is true, then
- Return ! CreateIterResultObject(null, true).
- Let R be O.[[IteratingRegExp]].
- Let S be O.[[IteratedString]].
- Let global be O.[[Global]].
- Let fullUnicode be O.[[Unicode]].
- Let match be ? RegExpExec(R, S).
- If match is null, then
- Set O.[[Done]] to true.
- Return ! CreateIterResultObject(null, true).
- Else,
- If global is true,
- Let matchStr be ? ToString(? Get(match, "0")).
- If matchStr is the empty string,
- Let thisIndex be ? ToLength(? Get(R, "lastIndex")).
- Let nextIndex be ! AdvanceStringIndex(S, thisIndex, fullUnicode).
- Perform ? Set(R, "lastIndex", nextIndex, true).
- Return ! CreateIterResultObject(match, false).
- Else,
- Set O.[[Done]] to true.
- Return ! CreateIterResultObject(match, false).
+
- Let O be the this value.
- If Type(O) is not Object, throw a TypeError exception.
- If O does not have all of the internal slots of a RegExp String Iterator Object Instance (see 5.3), throw a TypeError exception.
- If O.[[Done]] is true, then
- Return ! CreateIterResultObject(undefined, true).
- Let R be O.[[IteratingRegExp]].
- Let S be O.[[IteratedString]].
- Let global be O.[[Global]].
- Let fullUnicode be O.[[Unicode]].
- Let match be ? RegExpExec(R, S).
- If match is null, then
- Set O.[[Done]] to true.
- Return ! CreateIterResultObject(undefined, true).
- Else,
- If global is true,
- Let matchStr be ? ToString(? Get(match, "0")).
- If matchStr is the empty string,
- Let thisIndex be ? ToLength(? Get(R, "lastIndex")).
- Let nextIndex be ! AdvanceStringIndex(S, thisIndex, fullUnicode).
- Perform ? Set(R, "lastIndex", nextIndex, true).
- Return ! CreateIterResultObject(match, false).
- Else,
- Set O.[[Done]] to true.
- Return ! CreateIterResultObject(match, false).
diff --git a/spec.emu b/spec.emu
index 388f05c..d9db820 100644
--- a/spec.emu
+++ b/spec.emu
@@ -96,7 +96,7 @@ contributors: Jordan Harband
1. If Type(_O_) is not Object, throw a *TypeError* exception.
1. If _O_ does not have all of the internal slots of a RegExp String Iterator Object Instance (see ), throw a *TypeError* exception.
1. If _O_.[[Done]] is *true*, then
- 1. Return ! CreateIterResultObject(*null*, *true*).
+ 1. Return ! CreateIterResultObject(*undefined*, *true*).
1. Let _R_ be _O_.[[IteratingRegExp]].
1. Let _S_ be _O_.[[IteratedString]].
1. Let _global_ be _O_.[[Global]].
@@ -104,7 +104,7 @@ contributors: Jordan Harband
1. Let _match_ be ? RegExpExec(_R_, _S_).
1. If _match_ is *null*, then
1. Set _O_.[[Done]] to *true*.
- 1. Return ! CreateIterResultObject(*null*, *true*).
+ 1. Return ! CreateIterResultObject(*undefined*, *true*).
1. Else,
1. If _global_ is *true*,
1. Let _matchStr_ be ? ToString(? Get(_match_, *"0"*)).
diff --git a/spec.md b/spec.md
index 8263b7a..cbb714e 100644
--- a/spec.md
+++ b/spec.md
@@ -61,7 +61,7 @@ All RegExp String Iterator Objects inherit properties from the [%RegExpStringIte
1. If [Type][type](O) is not Object, throw a **TypeError** exception.
1. If O does not have all of the internal slots of a RegExp String Iterator Object Instance (see [here](#PropertiesOfRegExpStringIteratorInstances)), throw a **TypeError** exception.
1. If *O*.[[Done]] is **true**, then
- 1. Return ! [CreateIterResultObject][create-iter-result-object](**null**, **true**).
+ 1. Return ! [CreateIterResultObject][create-iter-result-object](**undefined**, **true**).
1. Let *R* be *O*.[[IteratingRegExp]].
1. Let *S* be *O*.[[IteratedString]].
1. Let *global* be *O*.[[Global]].
@@ -69,7 +69,7 @@ All RegExp String Iterator Objects inherit properties from the [%RegExpStringIte
1. Let *match* be ? [RegExpExec][regexp-exec](*R*, *S*).
1. If *match* is **null**, then
1. Set *O*.[[Done]] to **true**.
- 1. Return ! [CreateIterResultObject][create-iter-result-object](**null**, **true**).
+ 1. Return ! [CreateIterResultObject][create-iter-result-object](**undefined**, **true**).
1. Else,
1. If *global* is **true**,
1. Let *matchStr* be ? [ToString][to-string](? [Get][get](*match*, **"0"**)).