Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
The slip (|) before a range has higher precedence and it interprets the starting point of the range as a single-item list. This leads to two types of bugs, and both situations should likely be error messages:
1) Infinite loop when range contains letters, as the range starts from 1 and tries to reach the second letter by increasing a number:
<ZoffixW> m: .say for |"g".."z";
2) Incorrect range is produced when numbers are used for the range. It'll always start at 1 and proceed until the end number:
Relevant IRC conversation: http://irclog.perlgeek.de/perl6/2016-01-15#i_11894289
On Fri, 15 Jan 2016 10:24:16 -0800, firstname.lastname@example.org wrote:
...which warns on these:
$ perl6 -e 'say |4..5'
(don't know why that last one "works", but still worth warning.)
It also handles all the ^..^ variants.
On Fri, 06 Oct 2017 19:32:17 -0700, email@example.com wrote:
OK, PR merged in rakudo cb9d2e040
Tests in roast 6e9bab5de
These are just worries, not errors, but good enough?