Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make .rotate's argument Int(Cool)
This will do the right thing when a non-integer number is passed.
  • Loading branch information
perlpilot committed Jul 24, 2015
1 parent 6f292f5 commit 53bf41f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/List.pm
Expand Up @@ -370,7 +370,7 @@ my class List does Positional { # declared in BOOTSTRAP
$rlist;
}

method rotate(Cool $n is copy = 1) is nodal {
method rotate(Int(Cool) $n is copy = 1) is nodal {
self.gimme(*);
fail X::Cannot::Infinite.new(:action<rotate>) if $!nextiter.defined;
my $items = nqp::p6box_i(nqp::elems($!items));
Expand Down
2 changes: 1 addition & 1 deletion src/core/Parcel.pm
Expand Up @@ -95,7 +95,7 @@ my class Parcel does Positional { # declared in BOOTSTRAP
$parcel;
}

method rotate (Int $n is copy = 1) is nodal {
method rotate (Int(Cool) $n is copy = 1) is nodal {
my $elems := nqp::p6box_i(nqp::elems($!storage));
return self if !$elems;

Expand Down

0 comments on commit 53bf41f

Please sign in to comment.