Skip to content

Commit b9500f3

Browse files
committed
Reset readBuffer after changing position in file
Makes fudged test in S32-io/open.t pass
1 parent bc6f14a commit b9500f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vm/jvm/runtime/org/perl6/nqp/io/FileHandle.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ public void seek(ThreadContext tc, long offset, long whence) {
9191
} catch (IllegalArgumentException e) {
9292
throw ExceptionHandling.dieInternal(tc, e);
9393
}
94+
/* Reset readBuffer since content is out of sync after fc.position. */
95+
readBuffer = null;
9496
}
9597

9698
public long tell(ThreadContext tc) {

0 commit comments

Comments
 (0)