diff --git a/S32-list/sort.t b/S32-list/sort.t index 2f82da3d77..de6f71a0e8 100644 --- a/S32-list/sort.t +++ b/S32-list/sort.t @@ -1,6 +1,6 @@ use v6; use Test; -plan 29; +plan 31; # L @@ -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