Skip to content

Commit

Permalink
Calculate elems of non-num range more directly
Browse files Browse the repository at this point in the history
  • Loading branch information
TimToady committed Oct 1, 2015
1 parent e5a266b commit 92be579
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Range.pm
Expand Up @@ -274,7 +274,7 @@ my class Range is Cool does Iterable does Positional {
}

multi method Numeric(Range:D:) {
nextsame unless nqp::istype($.max,Numeric) && nqp::istype($.min,Numeric);
return self.flat.elems unless nqp::istype($.max,Numeric) && nqp::istype($.min,Numeric);

my $diff := $.max - $.min - $.excludes-min;

Expand Down

0 comments on commit 92be579

Please sign in to comment.