Permalink
Browse files

Ranges starting with @a.. and (1,2,3).. work (right hand side already…

… worked)
  • Loading branch information...
1 parent 2d5abca commit 5d09997669b49a4210c51a0810025b03d37a3d2a @lizmat lizmat committed Aug 31, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/Range.pm
View
3 src/core/Range.pm
@@ -28,7 +28,8 @@ my class Range is Iterable is Cool does Positional {
multi method new(Real $min, $max, :$excludes_min, :$excludes_max) {
nqp::create(self).BUILD($min, $max.Real, $excludes_min, $excludes_max)
}
- multi method new($min, $max, :$excludes_min, :$excludes_max) {
+ multi method new($min is copy, $max, :$excludes_min, :$excludes_max) {
+ $min = +$min if $min ~~ any(Parcel|List);
nqp::create(self).BUILD($min, $max, $excludes_min, $excludes_max)
}

0 comments on commit 5d09997

Please sign in to comment.