Skip to content

Commit 0fe4091

Browse files
committed
[Truffle] Dup String#b.
1 parent 766148d commit 0fe4091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public BNode(BNode prev) {
277277

278278
@Specialization
279279
public RubyString b(RubyString string) {
280-
final ByteList bytes = string.getBytes();
280+
final ByteList bytes = string.getBytes().dup();
281281
bytes.setEncoding(ASCIIEncoding.INSTANCE);
282282
return getContext().makeString(bytes);
283283
}

0 commit comments

Comments
 (0)