Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for say on self-referencing object RT #124242
  • Loading branch information
niner committed Sep 24, 2015
1 parent cecbb2a commit 95a6e77
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S02-names-vars/perl.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 102;
plan 103;
# L<S02/Names and Variables/To get a Perlish representation of any object>

my @tests = (
Expand Down Expand Up @@ -92,6 +92,19 @@ my @tests = (
".perl worked correctly on a mixed arrayref/hashref recursive structure";
}

{
class Bug {
has @.myself;
method bind( $myself ) {
@.myself[0] = $myself;
}
}
my $a1 = Bug.new;
$a1.bind( $a1 );
say $a1;
ok("survived saying a self-referencing object");
}

{
# test a bug reported by Chewie[] - apparently this is from S03
is(EVAL((("f","oo","bar").keys.List).perl), <0 1 2>, ".perl on a .keys list");
Expand Down

0 comments on commit 95a6e77

Please sign in to comment.