Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

JRUBY-2109: Rubicon test_io's test_reopen1 fails after IO reorg.

Regression tests are provided as part of rubyspecs.


git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@5924 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
commit 7fe5a9649597671c98fc9c598645fcf55ce65243 1 parent 5fcc772
@vvs vvs authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/org/jruby/util/io/ChannelStream.java
View
8 src/org/jruby/util/io/ChannelStream.java
@@ -795,7 +795,13 @@ public boolean isBlocking() {
public synchronized void freopen(String path, ModeFlags modes) throws DirectoryAsFileException, IOException, InvalidValueException, PipeException, BadDescriptorException {
// flush first
flushWrite();
-
+
+ // reset buffer
+ buffer.clear();
+ if (reading) {
+ buffer.flip();
+ }
+
this.modes = modes;
String cwd = getRuntime().getCurrentDirectory();
JRubyFile theFile = JRubyFile.create(cwd,path);
Please sign in to comment.
Something went wrong with that request. Please try again.