Skip to content

Commit

Permalink
Don't use nqp::iterator for Capture.WHICH
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 1, 2020
1 parent 6ee47f0 commit 912381b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core.c/Capture.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ my class Capture { # declared in BOOTSTRAP
my Mu $WHICH := nqp::list_s(nqp::eqaddr(self.WHAT,Capture) ?? 'Capture' !! nqp::unbox_s(self.^name));
if nqp::isconcrete(@!list) && nqp::elems(@!list) {
nqp::push_s($WHICH, '|');
my Mu $iter := nqp::iterator(@!list);
while $iter {
my Mu \value = nqp::shift($iter);
my Mu $list := nqp::clone(@!list);
while $list {
my Mu \value = nqp::shift($list);
nqp::push_s($WHICH, '(');
nqp::push_s($WHICH, nqp::unbox_s(value.VAR.WHICH));
nqp::push_s($WHICH, ')');
Expand Down

0 comments on commit 912381b

Please sign in to comment.