Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix reverse to directly delegate on arrays.
So we get the correct exception for reverse(@multi-dim).
  • Loading branch information
jnthn committed Dec 13, 2015
1 parent c2a726e commit c086506
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/List.pm
Expand Up @@ -1025,7 +1025,10 @@ multi sub infix:<xx>(Mu \x, Int() $n) is pure {
nqp::p6bindattrinvres(nqp::create(List), List, '$!reified', $list)
}

sub reverse(+@a) { @a.reverse }
proto sub reverse(|) { * }
multi sub reverse(@a) { @a.reverse }
multi sub reverse(+@a) { @a.reverse }

sub rotate(@a, Int $n = 1) { @a.rotate($n) }

sub prefix:<|>(\x) { x.Slip }
Expand Down

0 comments on commit c086506

Please sign in to comment.