Skip to content

Commit

Permalink
$obj.?method returns Nil, not undef.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jun 26, 2010
1 parent fd5e2e7 commit d401972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/List.pm
Expand Up @@ -61,7 +61,7 @@ augment class List does Positional {

# If &by.arity < 2, then it represents a block to be applied
# to the elements to obtain the values for sorting.
if (&by.?arity // 2) < 2 {
if (&by.?count || 2) < 2 {
my $list = self.map(&by).eager;
self[$index_rpa.sort(
-> $a, $b { $list[$a] cmp $list[$b] || $a <=> $b }
Expand Down

0 comments on commit d401972

Please sign in to comment.