diff --git a/core/src/main/java/org/jruby/RubyIOBuffer.java b/core/src/main/java/org/jruby/RubyIOBuffer.java index 80d1477e06d..62eb2d47b3b 100644 --- a/core/src/main/java/org/jruby/RubyIOBuffer.java +++ b/core/src/main/java/org/jruby/RubyIOBuffer.java @@ -1300,8 +1300,8 @@ private void bufferCopy(ThreadContext context, int offset, ByteList sourceBuffer } else { destBuffer.position(offset); destBuffer.put(sourceBuffer.getUnsafeBytes(), sourceBuffer.begin() + sourceOffset, length); - destBuffer.clear(); } + destBuffer.clear(); } @JRubyMethod(name = "get_string")