Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failure when unable to determine a sequence (RT #98678).
  • Loading branch information
pmichaud committed Sep 9, 2011
1 parent 5d26134 commit f9d94fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/operators.pm
Expand Up @@ -100,8 +100,9 @@ sub SEQUENCE($left, $right, :$exclude_end) {
elsif $tail.elems == 0 {
$code = {()}
}
fail "unable to deduce sequence" unless $code.defined;
$value = generate($code);
$value = $code.defined
?? generate($code)
!! (sub { fail "unable to deduce sequence" })();
}
take $value unless $exclude_end;
}, :$infinite), @right).list;
Expand Down

0 comments on commit f9d94fe

Please sign in to comment.