Skip to content

Commit

Permalink
[JVM] Reset eof to false after seeking
Browse files Browse the repository at this point in the history
Fixes tests in S16-io/eof.t (rakudo/rakudo#1322).

After a call to seek the state of eof might very well have changed. Better
reset it to false so that it is properly checked the next time eof is tested.
  • Loading branch information
usev6 committed Feb 23, 2018
1 parent a30610a commit b5da011
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vm/jvm/runtime/org/perl6/nqp/io/FileHandle.java
Expand Up @@ -92,6 +92,8 @@ public void seek(ThreadContext tc, long offset, long whence) {
}
/* Reset readBuffer since content is out of sync after fc.position. */
readBuffer = null;
/* Reset eof since it might have changed; needs to be checked anew. */
eof = false;
}

public long tell(ThreadContext tc) {
Expand Down

0 comments on commit b5da011

Please sign in to comment.