Skip to content
Permalink
Browse files

Don't double-close handle in .lines with :close and limit

  • Loading branch information...
zoffixznet committed Oct 19, 2018
1 parent b84b090 commit 6edb142f5f4cf83faf6fec889d784093e0524a97
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/IO/Handle.pm6
@@ -504,7 +504,7 @@ my class IO::Handle {
?? Seq.new(self!LINES-ITERATOR($close))
!! $close
?? Seq.new(Rakudo::Iterator.FirstNThenSinkAll(
self!LINES-ITERATOR($close), $limit.Int, {SELF.close}))
self!LINES-ITERATOR(0), $limit.Int, {SELF.close}))
!! self.lines.head($limit.Int)
}
multi method lines(IO::Handle:D \SELF: :$close) {

0 comments on commit 6edb142

Please sign in to comment.
You can’t perform that action at this time.