Skip to content

Commit

Permalink
Fix IO::CatHandle.read switching handles too soon
Browse files Browse the repository at this point in the history
Phixes R#1313, but makes .tell/.seek tests fail.
It's possbile the tests are bogus.
  • Loading branch information
zoffixznet committed Dec 19, 2017
1 parent 334b872 commit 33b3ff7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/IO/CatHandle.pm
Expand Up @@ -209,6 +209,7 @@ my class IO::CatHandle is IO::Handle {
(my $ret := buf8.new: $!active-handle.read: $bytes),
nqp::while(
nqp::islt_i(nqp::elems($ret), $bytes)
&& $!active-handle.eof
&& nqp::defined(self.next-handle),
$ret.append: $!active-handle.read:
nqp::sub_i($bytes, nqp::elems($ret))),
Expand Down

0 comments on commit 33b3ff7

Please sign in to comment.