Skip to content


No reason to truncate NUL:
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Apr 27, 2015
1 parent 8bb41db commit 59b4ba4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions core/src/main/java/org/jruby/util/
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ private Channel createChannel(ModeFlags flags) throws ResourceException {
throw new ResourceException.IOError(ioe);

try {
if (flags.isTruncate()) fileChannel.truncate(0);
} catch (IOException ioe) {
// ignore; it's a pipe or fifo that can't be truncated (we only care about illegal seek).
if (!ioe.getMessage().equals("Illegal seek")) throw new ResourceException.IOError(ioe);

return fileChannel;

0 comments on commit 59b4ba4

Please sign in to comment.