Skip to content

Commit

Permalink
Make Mu.iterator use R:I.OneValue
Browse files Browse the repository at this point in the history
The comment was out of date.  Needs a fix in roast where defined Mu value
is improperly tested for.
  • Loading branch information
lizmat committed Apr 19, 2020
1 parent 750abe0 commit 65fdea7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/core.c/Mu.pm6
Expand Up @@ -50,14 +50,7 @@ my class Mu { # declared in BOOTSTRAP
}

proto method iterator(|) {*}
multi method iterator(Mu:) {
my $buf := nqp::create(IterationBuffer);
$buf.push(Mu);
# note: cannot use R:I.OneValue, as that doesn't (and shouldn't)
# take Mu for the value to produce, as Mu is used to indicate
# exhaustion.
Rakudo::Iterator.ReifiedList($buf)
}
multi method iterator(Mu:) { Rakudo::Iterator.OneValue(self) }

proto method split(|) {*}

Expand Down

0 comments on commit 65fdea7

Please sign in to comment.