Skip to content

Commit f966c11

Browse files
committed
Add test for RT #115598
1 parent a458713 commit f966c11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

S04-statements/gather.t

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 21;
5+
plan 22;
66

77

88
# L<S04/The C<gather> statement prefix/>
@@ -195,4 +195,11 @@ plan 21;
195195
is ~@outer, "5 1 2 3 5", "method form of take works.";
196196
}
197197

198+
# RT #115598
199+
{
200+
my $x;
201+
my @a = gather { $x = take 3; };
202+
is $x, 3, "return value of take"
203+
}
204+
198205
# vim: ft=perl6

0 commit comments

Comments
 (0)