Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add candidate for sort to fix passing multi-dim.
Rather than letting it fall to the analysis done in the existing
candidate, which is doomed to fail.
  • Loading branch information
jnthn committed Dec 13, 2015
1 parent cb9ccb6 commit c2a726e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Any-iterable-methods.pm
Expand Up @@ -1492,7 +1492,10 @@ proto sub repeated(|) { * }
multi sub repeated(+values, |c) { my $laze = values.is-lazy; values.repeated(|c).lazy-if($laze) }

proto sub sort(|) {*}
multi sub sort($cmp, +values) {
multi sub sort(@values) {
@values.sort
}
multi sub sort($cmp, +values) {
nqp::istype($cmp, Callable)
?? values.sort($cmp)
!! (|$cmp,|values).sort;
Expand Down

0 comments on commit c2a726e

Please sign in to comment.