This now fails with X::Seq::Consumed:

$ perl6-m -e 'my @result = gather { take "foo=bar".split("=") }; say @result'
This Seq has already been iterated, and its values consumed
  in block <unit> at -e:1

Adding a 'flat' gives the expected result, though:

$ perl6-m -e 'my @result = flat gather { take "foo=bar".split("=") }; say 
@result.perl'
["foo", "bar"]

$ perl6-m -e 'my @result = gather { take "foo=bar".split("=") }.flat; say 
@result.perl'
["foo", "bar"]

Since this behaviour looks good to me, I added a test to 
S04-statements/gather.t with commit 
https://github.com/perl6/roast/commit/de87d7958b. Also, I'm closing this ticket 
as 'resolved'.

Reply via email to