Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
.perl on an itemized array should print the $
  • Loading branch information
niner committed Oct 6, 2015
1 parent 2e2b9fe commit e5f7adc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions S02-names-vars/list_array_perl.t
Expand Up @@ -49,14 +49,14 @@ my @tests = (
# test bug in .perl on result of hyperoperator
# first the trivial case without hyperop
my @foo = ([-1, -2], -3);
is @foo.item.perl, '[[-1, -2], -3]', ".perl on a nested list";
is @foo.item.perl, '$[[-1, -2], -3]', ".perl on a nested list";

my @hyp = -« ([1, 2], 3);
# what it currently (r16460) gives
isnt @hyp.item.perl, '[(-1, -2), -3]', "strange inner parens from .perl on result of hyperop";

# what it should give
is @hyp.item.perl, '[[-1, -2], -3]', ".perl on a nested list result of hyper operator";
is @hyp.item.perl, '$[[-1, -2], -3]', ".perl on a nested list result of hyper operator";
}

{
Expand Down
2 changes: 1 addition & 1 deletion S03-sequence/misc.t
Expand Up @@ -130,7 +130,7 @@ is (1, { $^n*2 + 1 } ... 31, *+5 ... { $^n**2 > 2000 }, 'a', *~'z' ... { $_.char
sub identity-matrix($n) {
[$[1, |(0 xx $n-1)], *.rotate(-1).item ... *[*-1] == 1]
}
is identity-matrix(5).perl, $[[1,0,0,0,0], [0,1,0,0,0], [0,0,1,0,0], [0,0,0,1,0], [0,0,0,0,1]].perl, "code endpoint protects item";
is identity-matrix(5).perl, [[1,0,0,0,0], [0,1,0,0,0], [0,0,1,0,0], [0,0,0,1,0], [0,0,0,0,1]].perl, "code endpoint protects item";
}

# vim: ft=perl6
2 changes: 1 addition & 1 deletion integration/advent2012-day22.t
Expand Up @@ -27,5 +27,5 @@ is-deeply @ip4addrs, [<127.0.0.1 173.194.32.32>], '.comb';
@ip = ();
@ip.push(.list>>.Str[0].perl) for m:g/ (\d ** 1..3) ** 4 % '.' /;
# RT #121789'
is-deeply @ip, [q<["127", "0", "0", "1"]>, q<["173", "194", "32", "32"]>], 'integer parse';
is-deeply @ip, [q<$["127", "0", "0", "1"]>, q<$["173", "194", "32", "32"]>], 'integer parse';

0 comments on commit e5f7adc

Please sign in to comment.