Skip to content

Commit

Permalink
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.core.array.ArrayUtils;
import org.jruby.util.ByteList;
import org.jruby.util.StringSupport;

import java.util.Arrays;

@@ -197,6 +198,7 @@ protected void writeByte(VirtualFrame frame, byte value) {
final int outputPosition = getOutputPosition(frame);
output[outputPosition] = value;
setOutputPosition(frame, outputPosition + 1);
setStringCodeRange(frame, value >= 0 ? StringSupport.CR_7BIT : StringSupport.CR_VALID);
increaseStringLength(frame, 1);
}

Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ public Object execute(VirtualFrame frame) {
frame.setObject(PackFrameDescriptor.OUTPUT_SLOT, new byte[expectedLength]);
frame.setInt(PackFrameDescriptor.OUTPUT_POSITION_SLOT, 0);
frame.setInt(PackFrameDescriptor.STRING_LENGTH_SLOT, 0);
frame.setInt(PackFrameDescriptor.STRING_CODE_RANGE_SLOT, StringSupport.CR_7BIT);
frame.setInt(PackFrameDescriptor.STRING_CODE_RANGE_SLOT, StringSupport.CR_UNKNOWN);
frame.setBoolean(PackFrameDescriptor.TAINT_SLOT, false);

child.execute(frame);

0 comments on commit d07dad9

Please sign in to comment.