Skip to content

Commit

Permalink
[t/spec] tests for RT #68112 sort doesnt accept &rand (or zero-arg su…
Browse files Browse the repository at this point in the history
…bs in general)

git-svn-id: http://svn.pugscode.org/pugs@31642 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
bbkr committed Jul 12, 2010
1 parent f7b0aa9 commit 46a0f39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S32-list/sort.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 29;
plan 31;

# L<S32::Containers/"List"/"=item sort">

Expand Down Expand Up @@ -210,4 +210,13 @@ plan 29;
'sort by class name';
}

# RT #68112
{
sub foo () { 0 }
lives_ok { (1..10).sort(&foo) },
'sort accepts 0-arity method';
lives_ok { (1..10).sort(&rand) },
'sort accepts rand method';
}

# vim: ft=perl6

0 comments on commit 46a0f39

Please sign in to comment.