# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #131319]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131319 >


Filing this to put through the mailing list chain, so more people know about 
it, as it's kind of severe-ish, depending on what you're doing...

On Apr 13, 2017, IO::Handle.lines($some-limit, :$close) was modified[^1][^2] to 
auto-close the handle when the limit is reached to prevent handle leak.

Unfortunately, this addition had a one-off bug and so the result is missing the 
last item (so, e.g. $limit of 2 will return just 1 item).

This affects these routines with this specific argument configuration:
- IO::Handle.lines: $limit, :close
- IO::Path.lines: $limit
- lines IO::Path $path, $limit
- lines IO::Handle $handle, $limit, :close

All the rest are not affected.

The bug *did* make it into latest (2017.04) Rakudo Star.

It is now fixed: https://github.com/rakudo/rakudo/commit/bf399380c1
And tested: https://github.com/perl6/roast/commit/f3d1f67988

[1] https://github.com/rakudo/rakudo/commit/29f58cd256c1d101f110a0
[2] https://github.com/rakudo/rakudo/commit/90da80f6202d4b44e2bf6b

Reply via email to