Skip to content

Commit

Permalink
test for RT #77036
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Oct 8, 2011
1 parent b166968 commit 7681064
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S04-statements/gather.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 17;
plan 18;


# L<S04/The C<gather> statement prefix/>
Expand Down Expand Up @@ -158,5 +158,18 @@ plan 17;
is ~grep-div(@evens, 3).munch(16), ~grep-div((1...100), 6), "Nested identical gathers";
}

# RT #77036
{
class E {
has $.n is rw;
has $.v;
method Str() {~self.v }
};
my E $x .= new(:v(1));
$x.n = E.new(:v(2));
is (gather { my $i = $x; while $i.defined { take $i; $i = $i.n } }).join("|"), '1|2', 'Elements in gather/take stringify correctly';

}


# vim: ft=perl6

0 comments on commit 7681064

Please sign in to comment.