We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 766148d commit 0fe4091Copy full SHA for 0fe4091
core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
@@ -277,7 +277,7 @@ public BNode(BNode prev) {
277
278
@Specialization
279
public RubyString b(RubyString string) {
280
- final ByteList bytes = string.getBytes();
+ final ByteList bytes = string.getBytes().dup();
281
bytes.setEncoding(ASCIIEncoding.INSTANCE);
282
return getContext().makeString(bytes);
283
}
0 commit comments