Skip to content

Commit

Permalink
Patch for sequence not terminating when the rhs is not .defined
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickas committed Oct 21, 2010
1 parent eef929e commit 7a2990d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/operators.pm
Expand Up @@ -395,7 +395,7 @@ our sub _HELPER_generate-series(@lhs, $rhs , :$exclude-limit) {
}

my $limit = ($rhs ~~ Whatever ?? Any !! $rhs);
return infinite-series(@lhs , $limit) unless $limit.defined; #Infinite series
return infinite-series(@lhs , $limit) if $rhs ~~ Whatever; #shortcut infinite series so we avoid the comparisions

fail ('Limit arity cannot be larger than 1') if $limit ~~ Code && $limit.count > 1;
my $series = infinite-series(@lhs , $limit);
Expand Down

0 comments on commit 7a2990d

Please sign in to comment.