Skip to content

Commit

Permalink
nqp::eoffh on parrot does not detect EOF early
Browse files Browse the repository at this point in the history
This re-introduced code that checks if we are at EOF. Also bump nqp for nqp::eoffh fix.
  • Loading branch information
FROGGS committed Oct 5, 2014
1 parent d033738 commit 58cd6f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/core/IO/Handle.pm
Expand Up @@ -299,7 +299,14 @@ my class IO::Handle does IO::FileTestable {
if $.chomp {
gather {
until nqp::eoffh($!PIO) {
#?if parrot
my Mu $line := nqp::readlinefh($!PIO);
last unless $line.DEFINITE;
take nqp::p6box_s($line).chomp;
#?endif
#?if !parrot
take nqp::p6box_s(nqp::readlinefh($!PIO)).chomp;
#?endif
$!ins = $!ins + 1;
}
self.close if $close;
Expand All @@ -308,7 +315,14 @@ my class IO::Handle does IO::FileTestable {
else {
gather {
until nqp::eoffh($!PIO) {
#?if parrot
my Mu $line := nqp::readlinefh($!PIO);
last unless $line.DEFINITE;
take nqp::p6box_s($line);
#?endif
#?if !parrot
take nqp::p6box_s(nqp::readlinefh($!PIO));
#?endif
$!ins = $!ins + 1;
}
self.close if $close;
Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
@@ -1 +1 @@
2014.09-17-g5107793
2014.09-20-gb79b20c

0 comments on commit 58cd6f1

Please sign in to comment.